@layer reset, base, components, utilities;

@import url("reset.css") layer(reset);
@import url("base.css") layer(base);
@import url("utilities.css") layer(utilities);

@layer components {

    /* テキストリンクのホバーエフェクト */
    a {
        position: relative;
        text-decoration: none;
        transition: color 0.15s ease-out;
    }

    a::after {
        content: '';
        position: absolute;
        left: 0;
        bottom: 0;
        width: 100%;
        height: 0;
        background-color: #000;
        transition: height 0.15s ease-out;
        z-index: -1;
    }

    a:hover {
        color: #fff;
    }

    a:hover::after {
        height: 100%;
    }

    /* リンク画像のホバーエフェクト */
    a>img {
        transition: filter 0.3s ease;
    }

    a:hover>img {
        filter: brightness(1.15);
    }

    a>video {
        transition: filter 0.3s ease;
    }

    a:hover>video {
        filter: brightness(1.15);
    }

    .loading {
        position: fixed;
        inset: 0;
        background-color: var(--color-background);
        display: grid;
        place-items: center;
        z-index: 9999;
        transition: opacity var(--transition), visibility var(--transition);
    }

    .loading svg {
        width: 120px;
    }

    .loading svg path {
        opacity: 0;
        animation: fadeInLetter 0.6s ease-out forwards;
    }

    .loading svg path:nth-child(1) {
        animation-delay: 0s;
    }

    .loading svg path:nth-child(2) {
        animation-delay: 0.5s;
    }

    .loading svg path:nth-child(3) {
        animation-delay: 1.0s;
    }

    .loading svg path:nth-child(4) {
        animation-delay: 1.5s;
    }

    @keyframes fadeInLetter {
        from {
            opacity: 0;
            transform: translateY(20px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .loading.loaded {
        opacity: 0;
        visibility: hidden;
    }

    .loading__spinner {
        width: clamp(40px, 4vw, 60px);
        height: clamp(40px, 4vw, 60px);
        border: 3px solid var(--color-border);
        border-top-color: var(--color-primary);
        border-radius: 50%;
        animation: spin 1s linear infinite;
    }

    .loading__progress {
        position: absolute;
        bottom: 20%;
        width: clamp(150px, 15vw, 200px);
        height: 4px;
        background-color: var(--color-border);
        border-radius: 2px;
        overflow: hidden;
    }

    .loading__progress-bar {
        height: 100%;
        background-color: var(--color-primary);
        width: 0%;
        transition: width 0.3s ease;
    }

    @keyframes spin {
        to {
            transform: rotate(360deg);
        }
    }

    .main-content {
        opacity: 0;
        overflow: hidden;
        transition: opacity 0.6s ease;
    }

    .main-content.visible {
        opacity: 1;
    }

    /* heroセクション */
    .hero {
        width: var(--width-screen);
        position: relative;
        overflow: hidden;

        .hero-bg img {
            clip-path: ellipse(120% 95% at 60% 0%);
        }

        .epor-logo {
            position: absolute;
            top: 3%;
            left: 3%;
            width: 8%;
            z-index: 2;
        }

        .hero-logo-container {
            position: absolute;
            top: 12%;
            right: 6%;
            text-align: center;

            .hero-logo {
                width: auto;
                height: clamp(3.5rem, 3.5rem + 6.5vw, 9.5rem);
                border-radius: 0.4rem;
            }

            .hero-logo svg {
                width: 100%;
                height: 100%;
            }

            .hero-sublogo {
                width: auto;
                height: clamp(2.5rem, 2.5rem + 4.5vw, 7.5rem);
                border-radius: 0.3rem;
                margin: 0;
            }

            .hero-sublogo svg {
                width: 100%;
                height: 100%;
            }

            .hero-label {
                margin-top: var(--space-fluid-sm);
                font-size: var(--text-fluid-2xl);
                letter-spacing: 1rem;
                font-weight: 400;
                color: #000;
                /* -webkit-text-stroke: 0.04rem #000;
                text-stroke: 0.04rem #000; */
            }

        }

        .hero-lead-container {
            display: flex;
            position: absolute;
            right: 3%;
            bottom: 16%;
            justify-content: center;
            gap: var(--space-fluid-md);
            margin-top: var(--space-fluid-md);

            & .lead-inner {
                overflow: hidden;
                line-height: 1;
                padding-bottom: 12px;
                /* アンダーライン用のスペースを確保 */
            }

            & .lead {
                font-size: clamp(0.8rem, 0.8rem + 1.8vw, 2.6rem);
                font-weight: 450;
                line-height: var(--line-height-relaxed);
                position: relative;
                display: inline-block;
                color: #fff;
                /* -webkit-text-stroke: 0.04rem #000;
                text-stroke: 0.04rem #000; */
            }

            & .lead::after {
                content: '';
                position: absolute;
                bottom: 0;
                left: 0;
                width: 100%;
                height: clamp(1px, 0.35vh, 3px);
                background-color: #fff;
                transform: scaleX(var(--underline-scale, 0));
                transform-origin: left;
            }
        }
    }

    /* introセクション */
    .intro {
        margin-top: var(--space-fluid-lg);
        margin-bottom: var(--space-fluid-xl);
        text-align: center;

        & p {
            text-align: center;
            font-size: var(--text-fluid-sm);
            line-height: var(--line-height-loose);
            color: var(--color-text-light);
        }
    }

    /* feature-sizeセクション */
    .feature-size {
        width: var(--width-screen);
        position: relative;
        margin-top: var(--space-fluid-xl);
        text-align: center;

        & .title {
            font-size: var(--text-fluid-5xl);
            font-weight: 600;

            & svg {
                width: 100%;
                max-width: 600px;
                height: auto;
                margin: 0 auto;
                display: block;
            }

            & .batsu {
                margin-inline: var(--space-fluid-sm);
                font-weight: 350;
                font-size: var(--text-fluid-6xl);
                vertical-align: sub;
            }
        }

        & .photo {
            width: var(--width-70);
            margin: 0 auto;
        }

        & .credit {
            width: var(--width-screen);
            margin: 0 auto;
            margin-block: var(--space-fluid-md);

            & .column {
                text-align: center;

                & .color {
                    font-size: var(--text-fluid-2xl);
                    font-weight: 500;

                    & .jp {
                        display: inline-block;
                        font-size: var(--text-fluid-lg);
                        margin-left: var(--space-fluid-sm);
                    }
                }

                & .size {
                    margin-top: var(--space-fluid-sm);

                    & a {
                        font-size: var(--text-fluid-base);
                        /* text-decoration: underline; */
                        border-bottom: 2px solid #000;
                    }
                }
            }
        }

        & .lead {
            font-size: var(--text-fluid-sm);
            line-height: var(--line-height-loose);
            margin-block: var(--space-fluid-mg);
        }
    }

    /* lightweightセクション */
    .lightweight {
        position: relative;
        width: var(--width-screen);
        min-height: 640px;
        margin-top: var(--space-fluid-4xl);
        margin-bottom: var(--space-fluid-lg);
        background: url('../assets/images/image15.webp') no-repeat left top;
        background-size: cover;

        & .floating {
            position: absolute;
            transform: translateX(-50%);
            top: -10%;
            left: 50%;
            width: var(--width-70);

            & .title {
                font-size: var(--text-fluid-5xl);
                font-weight: 600;
                padding-top: var(--space-fluid-lg);
                padding-left: var(--space-fluid-lg);
                padding-right: var(--space-fluid-lg);
            }

            & .subtitle {
                font-size: var(--text-fluid-xl);
                font-weight: 400;
                margin-bottom: var(--space-fluid-md);
                padding-left: var(--space-fluid-lg);
                padding-bottom: var(--space-fluid-md);
                border-bottom: 2px solid #000;
            }

            & .lead {
                font-size: var(--text-fluid-sm);
                line-height: var(--line-height-loose);
                padding-left: var(--space-fluid-lg);
            }

            & .video {
                position: relative;
                width: 360px;
            }

            & .tag {
                position: absolute;
                transform: translateX(-50%) translateY(-50%) rotate(90deg);
                bottom: 16px;
                left: -20px;
                font-weight: 600;
                letter-spacing: 0.05rem;
            }

        }
    }

    /* feature-storageセクション */
    .feature-storage {
        width: var(--width-screen);
        margin-top: var(--space-fluid-2xl);
        text-align: center;

        & .title {
            font-size: var(--text-fluid-5xl);
            font-weight: 600;
        }

        & .subtitle {
            font-size: var(--text-fluid-xl);
            font-weight: 400;
            margin-bottom: var(--space-fluid-md);
        }

        & .lead {
            font-size: var(--text-fluid-sm);
            line-height: var(--line-height-loose);
            margin-top: var(--space-fluid-md);
        }

        & .bagin {
            width: var(--width-80);
            margin: 0 auto;
            margin-block: var(--space-fluid-lg);

            & .column {
                flex: 1;
                max-width: 50%;

                & .swiper {
                    width: 100%;
                    height: auto;

                    & .swiper-slide {
                        width: 100%;
                        height: auto;

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

                & .credit {
                    display: block;
                    width: var(--width-fit);
                    font-size: var(--text-fluid-base);
                    margin: 0 auto;
                    margin-block: var(--space-fluid-md);
                    /* text-decoration: underline; */
                    border-bottom: 2px solid #000;

                    & .taxin {
                        font-size: var(--text-fluid-xs);
                    }
                }
            }

        }

        & .point {
            width: var(--width-40);
            margin: 0 auto;
            margin-block: var(--space-fluid-sm);

            & .lead {
                margin-top: var(--space-fluid-md);
                line-height: var(--line-height-loose);
                margin-top: var(--space-fluid-md);
            }
        }
    }

    /* feature-water-repellentセクション */
    .feature-water-repellent {
        width: var(--width-screen);
        margin-top: var(--space-fluid-2xl);
        text-align: center;

        & .title {
            font-size: var(--text-fluid-5xl);
            font-weight: 600;
        }

        & .subtitle {
            font-size: var(--text-fluid-xl);
            font-weight: 400;
            margin-bottom: var(--space-fluid-md);
        }

        & .lead {
            font-size: var(--text-fluid-sm);
            line-height: var(--line-height-loose);
            margin-top: var(--space-fluid-md);
        }

        & .video {
            position: relative;
            width: var(--width-40);
            margin: 0 auto;
            margin-top: var(--space-fluid-lg);

            & .tag {
                position: absolute;
                transform: translateX(-50%) translateY(-50%) rotate(90deg);
                bottom: 16px;
                left: -20px;
                font-weight: 600;
                letter-spacing: 0.05rem;
            }
        }
    }

    /* other-detailsセクション */
    .other-details {
        position: relative;
        width: var(--width-screen);
        min-height: 1000px;
        margin-top: var(--space-fluid-2xl);
        padding-top: var(--space-fluid-lg);
        margin-bottom: 240px;
        text-align: center;
        background: url('../assets/images/image15.webp') no-repeat left bottom;
        background-size: cover;


        & .floating {
            position: absolute;
            /* width: var(--width-90); */
            width: 1080px;
            transform: translateX(-50%);
            top: 100px;
            left: 50%;

            & .content-1 {
                width: 100%;

                & .column.left {
                    width: 50%;

                }

                & .column.right {
                    width: 50%;

                    & .title {
                        width: 100%;
                        font-size: var(--text-fluid-5xl);
                        font-weight: 600;
                        border-bottom: 2px solid #000;
                        padding-bottom: 10px;
                        padding-left: 30px;
                        text-align: left;
                    }

                    & .lead {
                        text-align: left;
                        width: 100%;
                        font-size: var(--text-fluid-sm);
                        line-height: var(--line-height-loose);
                        padding-top: 40px;
                        padding-left: 40px;
                    }
                }
            }

            & .content-2 {
                width: 800px;
                margin: 0 auto;
                margin-top: 60px;

                & .column.left {
                    width: 50%;
                    padding-right: 20px;
                }

                & .column.right {
                    width: 50%;
                    padding-left: 20px;
                }
            }

        }

        & .content-3 {
            width: var(--width-40);
            margin: 0 auto;
            margin-top: var(--space-fluid-2xl);
        }
    }

    /* Boat */
    .boat {
        width: var(--width-30);
        margin: 0 auto;
    }

    /* EC */
    .ec-1 {
        width: var(--width-fit);
        margin: 0 auto;
        margin-bottom: var(--space-fluid-lg);
        text-align: left;

        & .credit {
            display: block;
            font-size: var(--text-fluid-base);
            margin-bottom: var(--space-fluid-md);
            /* text-decoration: underline; */
            border-bottom: 2px solid #000;

            & .taxin {
                font-size: var(--text-fluid-xs);
            }
        }
    }

    /* EC */
    .ec-2 {
        width: var(--width-80);
        margin: 0 auto;
        margin-top: var(--space-fluid-3xl);

        & .flex:first-child {
            margin-bottom: var(--space-fluid-md);
        }

        & .flex {

            & .column {

                & .credit {
                    display: block;
                    width: var(--width-fit);
                    font-size: var(--text-fluid-base);
                    line-height: var(--line-height-normal);
                    margin: 0 auto;
                    margin-top: var(--space-fluid-sm);
                    text-align: center;
                    /* text-decoration: underline; */
                    border-bottom: 2px solid #000;

                    & .taxin {
                        font-size: var(--text-fluid-xs);
                    }
                }
            }
        }
    }

    /* Links */
    .links {
        margin-block: var(--space-fluid-2xl);
        text-align: center;

        & .button {
            width: var(--width-80);
            font-size: var(--text-fluid-base);
            margin: 0 auto;
            max-width: 600px;
            min-height: 70px;
            border: 1px solid #000;
            background-color: #fff;
            position: relative;
            overflow: hidden;
            transition: color 0.1s ease-out, border-color 0.1s ease-out;
            z-index: 1;

            &::before {
                content: '';
                position: absolute;
                bottom: 0;
                left: 0;
                width: 100%;
                height: 0;
                background-color: #000;
                transition: height 0.1s ease-out;
                z-index: -1;
            }

            &:hover {
                color: #fff;
                border-color: #000;

                &::before {
                    height: 100%;
                }
            }
        }

        & .button:nth-child(1) {
            margin-bottom: var(--space-fluid-lg);
        }
    }

    /* Footer */
    .footer {
        margin-top: 160px;

        & a:hover img {
            opacity: 0.5;
        }

        .footer-logo {
            margin: 0 auto 90px auto;
        }

        .footer-logo h3 {
            width: 6%;
            margin: 0 auto 5px auto;
        }

        .footer-logo h3 img {
            width: 100%;
        }

        .footer-logo p {
            font-size: 0.7rem;
            line-height: 2.4rem;
            letter-spacing: 0.1rem;
            text-align: center;
        }

        .footer-link {
            font-size: 0.8rem;
            letter-spacing: 0.1rem;
            margin: 0 auto 90px auto;
            text-align: center;
        }

        .footer-link span {
            color: #aaa;
            margin: 0 15px;
        }

        .footer-sns {
            margin: 0 auto 90px auto;
        }

        .footer-sns p {
            font-size: 1.2rem;
            letter-spacing: 0.1rem;
            margin: 0 auto 30px auto;
            text-align: center;
        }

        .footer-sns a {
            display: block;
            width: 40px;
            margin: 0 auto;
        }

        .footer-sns a:nth-of-type(3) img {
            margin: 0 15px 0 8px;
        }

        .footer-copyright {
            width: 100%;
            text-align: center;
            margin: 0 auto 90px auto;
        }

        .footer-copyright p {
            font-size: 0.7rem;
            letter-spacing: 0.1rem;
        }
    }
}

@media (max-width: 768px) {

    .loading svg {
        width: 80px;
    }

    .hero-bg img {
        clip-path: ellipse(180% 95% at 30% 0%);
    }

    .epor-logo {
        position: absolute;
        top: 5.5%;
        left: 6%;
        width: 14%;
        z-index: 2;
    }

    /* heroセクション */
    .hero-logo-container {
        top: 5%;
        right: 2%;
        gap: 0.5rem;
        display: block;
        text-align: center;
        width: 180px;

        .hero-logo {
            height: clamp(2.5rem, 6vw, 5rem);
        }

        .hero-sublogo {
            height: clamp(2rem, 5vw, 4rem);
        }

        .hero-label {
            margin-top: var(--space-fluid-xs);
            font-size: var(--text-fluid-sm);
            font-weight: 500;
            letter-spacing: 0.5rem;
            color: #000;
            /* -webkit-text-stroke: 0.02rem #000;
            text-stroke: 0.02rem #000; */
        }

        .hero-lead-container {
            position: absolute;
            bottom: 0;
            left: 0;
            margin-top: 0;
            margin-left: 0;
            text-align: left;
        }
    }

    .hero-lead-container {
        position: absolute;
        left: 6%;
        bottom: 12%;
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 0;
        padding-bottom: 0;
        /* gap: var(--space-fluid-xs); */
        /* margin-top: var(--space-fluid-md); */

        & .lead-inner {
            overflow: hidden;
            line-height: 1;
            padding-bottom: 2px;
        }

        & .lead {
            font-size: clamp(1rem, 1rem + 2vw, 3rem);
            font-weight: 500;
            line-height: var(--line-height-relaxed);
            position: relative;
            display: inline-block;
            color: #fff;
            /* -webkit-text-stroke: 0.02rem #000;
            text-stroke: 0.02rem #000; */
        }

        & .lead::after {
            content: '';
            position: absolute;
            bottom: 2px;
            left: 0;
            width: 100%;
            height: clamp(1px, 0.35vh, 2px);
            background-color: #fff;
            transform: scaleX(var(--underline-scale, 0));
            transform-origin: left;
        }
    }

    /* introセクション */
    .intro {
        margin-block: 0;
        margin-top: var(--space-fluid-lg);
    }

    /* feature-sizeセクション */
    .feature-size {
        margin-top: var(--space-fluid-lg);

        & .title {
            font-size: var(--text-fluid-4xl);

            & svg {
                width: 100%;
                height: auto;
            }

            & .batsu {
                font-size: var(--text-fluid-5xl);
            }
        }

        & .photo {
            width: var(--width-100);
        }
    }

    /* lightweightセクション */
    .lightweight {
        position: relative;
        width: var(--width-screen);
        margin-top: var(--space-fluid-xl);
        margin-bottom: var(--space-fluid-lg);
        background: none;

        & .floating {
            flex-direction: column-reverse;
            position: relative;
            width: var(--width-70);

            & .title {
                font-size: var(--text-fluid-4xl);
                font-weight: 600;
                padding-top: 0;
                padding-left: 0;
                padding-right: 0;
            }

            & .subtitle {
                font-size: var(--text-fluid-lg);
                font-weight: 400;
                text-align: center;
                margin-bottom: 0;
                padding-left: 0;
                padding-bottom: 0;
                border: none;
            }

            & .lead {
                font-size: var(--text-fluid-sm);
                line-height: var(--line-height-loose);
                text-align: center;
                padding-left: 0;
                margin-block: var(--space-fluid-md);
            }

            & .video {
                width: 300px;
            }
        }
    }

    /* feature-storageセクション */
    .feature-storage {
        margin-top: var(--space-fluid-xl);

        & .title {
            font-size: var(--text-fluid-4xl);
            font-weight: 600;
        }

        & .subtitle {
            font-size: var(--text-fluid-lg);
            font-weight: 400;
        }

        & .bagin {
            gap: var(--space-2);
            width: var(--width-90);
            margin-block: var(--space-fluid-md);
        }

        & .point {
            width: var(--width-90);
            margin-block: var(--space-fluid-xs);

            & img {
                width: var(--width-50);
                margin: 0 auto;
            }
        }
    }

    /* feature-water-repellentセクション */
    .feature-water-repellent {
        margin-top: var(--space-fluid-xl);

        & .title {
            font-size: var(--text-fluid-4xl);
        }

        & .subtitle {
            font-size: var(--text-fluid-lg);
        }

        & .lead {
            font-size: var(--text-fluid-sm);
            line-height: var(--line-height-loose);
            margin-top: var(--space-fluid-md);
        }

        & .video {
            position: relative;
            width: 300px;
            margin: 0 auto;
            margin-top: var(--space-fluid-lg);

            & .tag {
                position: absolute;
                transform: translateX(-50%) translateY(-50%) rotate(90deg);
                bottom: 16px;
                left: -20px;
                font-weight: 600;
                letter-spacing: 0.05rem;
            }
        }
    }

    /* other-detailsセクション */
    .other-details {
        margin-top: 0;
        padding-top: 0;
        margin-top: var(--space-fluid-xl);
        margin-bottom: 0;
        min-height: 0;
        background: none;


        & .floating {
            position: relative;
            width: var(--width-90);
            top: 0;

            & .content-1 {
                width: 100%;
                flex-direction: column-reverse;

                & .column.left {
                    width: 100%;
                }

                & .column.right {
                    width: 100%;

                    & .title {
                        width: 100%;
                        font-size: var(--text-fluid-4xl);
                        border: none;
                        padding-bottom: 0;
                        padding-left: 0;
                        text-align: center;
                    }

                    & .lead {
                        width: 100%;
                        text-align: center;
                        font-size: var(--text-fluid-sm);
                        line-height: var(--line-height-loose);
                        padding-top: 0;
                        padding-left: 0;
                        margin-block: var(--space-fluid-md);
                    }
                }
            }

            & .content-2 {
                width: var(--width-90);
                margin: 0 auto;
                margin-top: var(--space-fluid-sm);

                & .column.left {
                    width: 50%;
                    padding-right: var(--space-fluid-xs);
                }

                & .column.right {
                    width: 50%;
                    padding-left: var(--space-fluid-xs);
                }
            }

        }

        & .content-3 {
            width: var(--width-40);
            margin: 0 auto;
            margin-top: var(--space-fluid-2xl);
        }
    }

    /* Boat */
    .boat {
        width: var(--width-60);
        margin: 0 auto;
        margin-top: var(--space-fluid-xl);
    }

    /* EC */
    .ec-1 {
        & .credit:nth-child(1) {
            margin-bottom: var(--space-fluid-md);
        }
    }

    /* EC */
    .ec-2 {
        margin-top: var(--space-fluid-xl);

        & .flex:first-child {
            margin-bottom: var(--space-fluid-md);
        }

        & .flex {
            gap: var(--space-4);

            & .column {
                & .credit {
                    display: block;
                    font-size: var(--text-fluid-base);
                    line-height: var(--line-height-normal);
                    margin-top: var(--space-fluid-sm);
                    text-align: center;
                    text-decoration: underline;

                    & .taxin {
                        font-size: var(--text-fluid-xs);
                    }
                }
            }
        }
    }

    /* Footer */
    .footer {
        .footer-logo h3 {
            width: 20%;
        }
    }
}