@font-face {
    font-family: 'Forum';
    src: url('../font/Forum-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

:root {
    --page-bg: #051f42;
    --edge-fade: clamp(72px, 12vw, 150px);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Forum', sans-serif;
}

.plug {
    display: flex;
    justify-content: center;
    background: var(--page-bg);
    width: 100%;
    min-height: 100vh;
}

.plug .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 100%;
    width: 100%;

    @media screen and (max-width: 768px) {
        justify-content: center;
    }
}

.video-wrapper {
    margin-bottom: 39px;
    max-width: 900px;
    width: 100%;
    position: relative;
    overflow: hidden;
    background: var(--page-bg);
}

.video-wrapper:before {
    position: absolute;
    content: '';
    z-index: 3;
    pointer-events: none;
    inset: 0;
    background:
        linear-gradient(90deg, var(--page-bg) 0, rgba(5, 31, 66, 0.85) 24px, rgba(5, 31, 66, 0) var(--edge-fade)),
        linear-gradient(270deg, var(--page-bg) 0, rgba(5, 31, 66, 0.85) 24px, rgba(5, 31, 66, 0) var(--edge-fade)),
        linear-gradient(180deg, var(--page-bg) 0, rgba(5, 31, 66, 0) calc(var(--edge-fade) * 0.45)),
        linear-gradient(0deg, var(--page-bg) 0, rgba(5, 31, 66, 0) calc(var(--edge-fade) * 0.45));

        @media screen and (max-width: 768px) {
            top: -11px;
        }   
}

video {
    position: relative;
    z-index: 1;
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    opacity: 0;
    transition: opacity 1.2s ease-in-out;
    -webkit-mask: linear-gradient(
        90deg,
        transparent 0,
        rgba(0, 0, 0, 0.18) 28px,
        #000 var(--edge-fade),
        #000 calc(100% - var(--edge-fade)),
        rgba(0, 0, 0, 0.18) calc(100% - 28px),
        transparent 100%
    );
    mask: linear-gradient(
        90deg,
        transparent 0,
        rgba(0, 0, 0, 0.18) 28px,
        #000 var(--edge-fade),
        #000 calc(100% - var(--edge-fade)),
        rgba(0, 0, 0, 0.18) calc(100% - 28px),
        transparent 100%
    );
}

.video-wrapper.is-video-ready video {
    opacity: 1;
}

.text-wrapper {
    min-height: 98px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.dynamic-title {
    font-style: normal;
    font-weight: 400;
    font-size: 44px;
    line-height: 49px;
    text-transform: uppercase;
    background: linear-gradient(180deg, #FDD46D -0.6%, #E5A83D 100%), #FFFFFF;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-fill-color: transparent;
    margin: 0;
    text-align: center;
    transition: opacity 0.8s ease-in-out;
}

.fade-out {
    opacity: 0;
}

.fade-in {
    opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
    video,
    .dynamic-title {
        transition: none;
    }
}

@media (max-width: 768px) {
    .plug .container {
        padding: 40px 0;
    }

    video {
        height: 400px;
    }

    .dynamic-title {
        font-size: 32px;
        line-height: 38px;
    }

    .text-wrapper {
        min-height: 76px;
        padding: 0 20px;
    }
}

@media (max-width: 480px) {
    .plug .container {
        padding: 30px 0;
    }

    video {
        height: 250px;
    }

    .dynamic-title {
        font-size: 24px;
        line-height: 30px;
    }

    .text-wrapper {
        min-height: 60px;
    }
}
