.top-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    height: 400px;
}

.top-grid .box {
    padding: 40px;
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    color: white;
    font-size: 42px;
    font-weight: 700;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: color 0.3s ease;
    z-index: 0;
}

.top-grid .box span {
    position: relative;
    z-index: 1;
}

.top-grid .box span::after {
    content: "\f054";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    margin-left: 8px;
    font-size: 0.6em;
    vertical-align: middle;
    display: inline-block;
    transition: transform .25s ease;
    color: inherit;
}

.top-grid .box:hover span::after {
    transform: translateX(4px);
}

.box.life {
    background: #2794EB;
}

.box.molecular {
    background: #38C6BD;
}

.box.plastic {
    background: #1ECCE4;
}

.box.others {
    background: #56C2F8;
}

.top-grid .box::before {
    content: "";
    position: absolute;
    top: 10px;
    right: -30px;
    bottom: -40px;
    left: 10px;
    background-size: cover;
    background-position: center;
    transform: scale(1.2);
    opacity: 0;
    transition: transform 0.6s ease, opacity 0.6s ease;
    z-index: 0;
}

.top-grid .box:hover::before {
    transform: scale(1);
    opacity: 1;
}

.box.life::before {
    background-image: url('../img/life-hover.png');
    background-repeat: no-repeat;
    background-position: right -90px bottom 40px;
    background-size: clamp(250px, 110%, 570px) auto;
}

.box.molecular::before {
    background-image: url('../img/molecular-hover.png');
    background-repeat: no-repeat;
    background-position: right -80px bottom 20px;
    background-size: clamp(230px, 100%, 520px) auto;
}

.box.plastic::before {
    background-image: url('../img/plastic-hover.png');
    background-repeat: no-repeat;
    background-position: right -80px bottom 20px;
    background-size: clamp(450px, 100%, 800px) auto;
}

.box.others::before {
    background-image: url('../img/other-hover.png');
    background-repeat: no-repeat;
    background-position: right 40px bottom 70px;
    background-size: clamp(140px, 45%, 100px) auto;
}

.top-grid .box:hover {
    color: #041983;
    text-decoration: underline;
    text-decoration-color: #041983;
    text-underline-offset: 10px;
}

.bottom-section {
    display: flex;
    gap: 10px;
    padding: 10px 0;
}

.bottom-box {
    flex: 1;
    height: 790px;
    display: flex;
    align-items: flex-end;
    padding: 60px;
    box-sizing: border-box;
}

.bg-box.overview {
    background: url("../img/main01.png") no-repeat center/cover;
}

.bg-box.company {
    background: url("../img/main02.png") no-repeat center/cover;
}

.overlay-text {
    color: white;
    max-width: 467px;
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.overlay-text p {
    font-size: 32px;
    font-weight: 500;
    line-height: 1.4;
}

.overlay-logo {
    width: 290px;
    height: auto;
}

.overlay-text.company-text {
    gap: 15px;
    color: #1C3855;
    max-width: 610px;
}

.overlay-text.company-text h3 {
    font-size: 20px;
    font-weight: 700;
    line-height: 28px;
}

.overlay-text.company-text p {
    font-size: 20px;
    font-weight: 400;
    line-height: 1.5;
}

@keyframes wipeReveal {
    from {
        clip-path: inset(0 100% 0 0);
    }

    to {
        clip-path: inset(0 0 0 0);
    }
}

.top-grid .box,
.bottom-section .bottom-box {
    opacity: 1;
    animation: wipeReveal 0.8s ease-out forwards;
    will-change: clip-path;
}

.top-grid .box:nth-child(1) {
    animation-delay: 0.12s;
}

.top-grid .box:nth-child(2) {
    animation-delay: 0.18s;
}

.top-grid .box:nth-child(3) {
    animation-delay: 0.22s;
}

.top-grid .box:nth-child(4) {
    animation-delay: 0.16s;
}

.bottom-section .bottom-box:nth-child(1) {
    animation-delay: 0.20s;
}

.bottom-section .bottom-box:nth-child(2) {
    animation-delay: 0.26s;
}

@media (prefers-reduced-motion: reduce) {

    .top-grid .box,
    .bottom-section .bottom-box {
        animation: none !important;
        clip-path: inset(0 0 0 0) !important;
    }
}

@supports not (clip-path: inset(0 0 0 0)) {
    @keyframes maskReveal {
        from {
            -webkit-mask: linear-gradient(#000 0 0) left/0% 100% no-repeat;
        }

        to {
            -webkit-mask: linear-gradient(#000 0 0) left/100% 100% no-repeat;
        }
    }

    .top-grid .box,
    .bottom-section .bottom-box {
        -webkit-mask: linear-gradient(#000 0 0) left/0% 100% no-repeat;
        animation: maskReveal 1.2s ease-out forwards;
    }
}

.overlay-text,
.overlay-text p {
    word-break: keep-all;
    overflow-wrap: anywhere;
}

@media (max-width:1440px) {

    .top-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 12px;
    }

    .top-grid .box {
        padding: 32px;
        font-size: 38px;
    }

    .bottom-section {
        gap: 12px;
        padding: 12px 0;
    }

    .bottom-box {
        height: clamp(520px, 42vw, 760px);
        padding: 48px;
    }

    .overlay-text {
        max-width: min(90%, 680px);
        gap: 24px;
    }

    .overlay-text p {
        font-size: 28px;
        line-height: 1.45;
    }

    .overlay-logo {
        width: clamp(180px, 16vw, 260px);
    }

    .bottom-box.company {
        height: auto;
        min-height: clamp(480px, 36vw, 680px);
    }
}

@media (max-width:1280px) {

    .top-grid {
        height: auto;
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .top-grid .box {
        aspect-ratio: 16/10;
        padding: 28px;
        font-size: 34px;
    }

    .bottom-section {
        gap: 12px;
        padding: 12px 0;
    }

    .bottom-box {
        height: clamp(420px, 40vw, 640px);
        padding: 40px;
    }

    .overlay-text {
        max-width: min(90%, 640px);
        gap: 22px;
    }

    .overlay-text p {
        font-size: 24px;
    }

    .bottom-box.company {
        height: auto;
        min-height: clamp(420px, 36vw, 620px);
    }
}

@media (max-width:1024px) {
    .content {
        padding-left: 24px;
        padding-right: 24px;
        padding-top: calc(56px + 16px);
    }

    .bottom-section {
        flex-direction: column;
    }

    .bottom-box {
        height: clamp(320px, 46vh, 520px);
        min-height: 320px;
        padding: 28px;
    }

    .overlay-text {
        max-width: 100%;
        gap: 18px;
    }

    .overlay-text p {
        font-size: 20px;
        line-height: 1.5;
    }

    .overlay-logo {
        width: clamp(140px, 22vw, 220px);
    }

    .top-grid .box {
        aspect-ratio: 16/12;
        font-size: 26px;
        padding: 24px;
    }

    .bottom-box.company {
        height: auto;
        min-height: 0;
        padding-bottom: 28px;
    }
}

@media (max-width:768px) {

    .top-grid .box::before {
        opacity: 1;
        transform: scale(1);
    }

    .top-grid .box.others::before {
        background-size: clamp(110px, 32%, 200px) auto;
    }

    .content {
        padding-left: 16px;
        padding-right: 16px;
    }

    .top-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .top-grid .box {
        aspect-ratio: 4/3;
        font-size: 22px;
        padding: 20px;
    }

    .overlay-text.company-text h3 {
        font-size: 18px;
        line-height: 1.4;
    }

    .overlay-text.company-text p {
        font-size: 16px;
        line-height: 1.55;
    }

    .bottom-box.company {
        height: auto;
    }
}

@media (max-width:480px) {
    .content {
        padding-top: calc(54px + 16px);
    }

    .top-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .top-grid .box {
        aspect-ratio: 7/5;
        font-size: 20px;
        padding: 18px;
    }

    .overlay-logo {
        width: clamp(110px, 34vw, 160px);
    }

    .bottom-box.company {
        height: auto;
    }
}