/* MacBook Mockup CSS */
.mockup {
    display: inline-block;
    position: relative;
    z-index: 3;
    text-align: center;
    font-size: 0;
    perspective: 2400px;
    perspective-origin: 50% 100%;
    opacity: 0;
    transition: 500ms opacity;
}

.mockup.loaded {
    opacity: 1;
}

.mockup .part .top,
.mockup .part .bottom {
    position: absolute;
    top: 0;
    left: 0;
}

/* Initial State of the Top Part (Closed/Angled) */
.mockup .part.top {
    transform: translate3d(0, 0, 0) rotateX(-90deg);
    transform-origin: 50% 100%;
}

/* Triggered by .scroll-active class */
.mockup.scroll-active .part.top {
    transform: translate3d(0, 0, 0) rotateX(0deg);
}

.mockup .part {
    display: inline-block;
    position: relative;
    -webkit-transform-style: preserve-3d;
    transform-style: preserve-3d;
    transform-origin: 50% 100%;
    transition: 900ms;
}

.mockup.opened .part .top {
    transform: translate3d(0, 0, -11px) rotateX(90deg) scale(1, 1);
}

.mockup .part .top {
    transform-origin: 50% 0;
    transform: translate3d(0, 0, -11px) rotateX(90deg);
    transition: transform 900ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.mockup img {
    display: block;
    max-width: 100%;
    backface-visibility: hidden;
}

.mockup .part .cover {
    position: relative;
}

.mockup video {
    display: block;
    position: absolute;
    top: 8%;
    left: 4%;
    width: 92%;
    border-radius: 6px;
    backface-visibility: hidden;
    transform: translate3d(0, 0, 1px);
}

.mockup .part.bottom {
    position: absolute;
    top: 0px;
    /* Adjusted to position below the shorter cover */
    left: 0;
    transform: translate3d(0, 0, 0) rotateX(-90deg);
}

.mockup .part .bottom {
    transform-origin: 50% 0;
    transform: translate3d(0, 0, 0) rotateX(90deg);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .mockup {
        transform: scale(0.6);
        /* Negative margins to reduce whitespace caused by scaling */
        margin-top: -60px;
        margin-bottom: -60px;
        width: 100%;
        max-width: 100%;
    }

    .mockup img {
        max-width: 100%;
        height: auto;
    }
}

@media (max-width: 480px) {
    .mockup {
        transform: scale(0.45);
        margin-top: -80px;
        margin-bottom: -80px;
    }
}