@font-face {
    font-family: "Space Grotesk";
    src: url("font/SpaceGrotesk-VariableFont_wght.ttf") format("truetype");
    font-style: normal;
    font-weight: 300 700;
    font-display: swap;
}

:root {
    --discord: #5865f2;
    --discord-hover: #6d78ff;
    --ink: #edf1ff;
    --muted: #aab2cb;
}

* {
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    min-height: 100%;
    margin: 0;
}

body {
    font-family: "Space Grotesk", system-ui, sans-serif;
    color: var(--ink);
    background: #080d1c;
}

.redirect-page {
    position: relative;
    isolation: isolate;
    min-height: 100vh;
    min-height: 100svh;
    display: grid;
    place-items: center;
    overflow: hidden;
    padding: 24px;
}

.background {
    position: absolute;
    z-index: -2;
    inset: 0;
    background:
        linear-gradient(115deg, rgba(5, 9, 24, .92) 0%, rgba(8, 15, 38, .55) 58%, rgba(5, 8, 20, .78) 100%),
        url("S4L_Website_Header-final.jpg") center / cover no-repeat;
    transform: scale(1.02);
}

.background::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 72% 38%, rgba(88, 101, 242, .22), transparent 24%),
        linear-gradient(180deg, transparent 55%, rgba(5, 8, 20, .7));
}

.community-card {
    width: min(920px, calc(100vw - 48px));
    min-height: 410px;
    display: grid;
    grid-template-columns: minmax(260px, .82fr) 1.18fr;
    align-items: center;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .11);
    border-radius: 28px;
    background: rgba(10, 15, 31, .88);
    box-shadow: 0 24px 70px rgba(0, 0, 0, .48), inset 0 1px 0 rgba(255, 255, 255, .05);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.brand-mark {
    height: 100%;
    min-height: 410px;
    display: grid;
    place-items: center;
    padding: 42px;
    border-right: 1px solid rgba(255, 255, 255, .07);
    background:
        radial-gradient(circle, rgba(88, 101, 242, .16), transparent 62%),
        rgba(4, 8, 22, .42);
}

.brand-logo {
    width: min(300px, 100%);
    max-height: 180px;
    object-fit: contain;
    filter: drop-shadow(0 18px 24px rgba(0, 0, 0, .32));
}

.card-copy {
    padding: 56px;
}

h1 {
    max-width: 480px;
    margin: 0;
    font-size: clamp(42px, 5vw, 70px);
    line-height: .98;
    letter-spacing: -.055em;
}

h1 span {
    display: block;
    color: #7e89ff;
}

.subtitle {
    max-width: 460px;
    margin: 22px 0 20px;
    color: var(--muted);
    font-size: 17px;
    line-height: 1.65;
}

.redirect-status {
    margin: 0 0 14px;
}

.redirect-status p {
    margin: 0 0 10px;
    color: #c8cee2;
    font-size: 14px;
    text-align: center;
}

.redirect-status strong {
    color: #fff;
    font-size: 16px;
}

.progress-track {
    height: 6px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255, 255, 255, .09);
}

.progress-bar {
    width: 100%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #5865f2, #8791ff);
    box-shadow: 0 0 16px rgba(88, 101, 242, .7);
    transform-origin: left;
}

.progress-bar.is-running {
    animation: redirect-progress var(--duration) linear forwards;
}

.redirect-status.is-complete .progress-track {
    background: rgba(87, 242, 135, .12);
}

.redirect-status.is-complete .progress-bar {
    width: 100%;
    background: #57f287;
    box-shadow: 0 0 16px rgba(87, 242, 135, .6);
}

@keyframes redirect-progress {
    from { transform: scaleX(1); }
    to { transform: scaleX(0); }
}

.discord-button {
    width: 100%;
    min-height: 62px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border: 1px solid rgba(255, 255, 255, .11);
    border-radius: 14px;
    color: #fff;
    background: var(--discord);
    box-shadow: 0 14px 32px rgba(88, 101, 242, .28);
    font-size: 18px;
    font-weight: 700;
    text-decoration: none;
    transition: transform .18s ease, background .18s ease, box-shadow .18s ease;
}

.discord-button img {
    width: 31px;
    height: 31px;
    object-fit: contain;
}

.discord-button:hover {
    transform: translateY(-2px);
    background: var(--discord-hover);
    box-shadow: 0 18px 38px rgba(88, 101, 242, .38);
}

.discord-button:active {
    transform: translateY(0);
}

.discord-button:focus-visible {
    outline: 3px solid rgba(255, 255, 255, .9);
    outline-offset: 4px;
}

@media (max-width: 720px) {
    .redirect-page {
        align-items: center;
        padding: 16px;
    }

    .community-card {
        width: 100%;
        max-width: 480px;
        min-height: 0;
        grid-template-columns: 1fr;
    }

    .brand-mark {
        min-height: 150px;
        border-right: 0;
        border-bottom: 1px solid rgba(255, 255, 255, .07);
        padding: 24px;
    }

    .brand-logo {
        width: 240px;
        max-height: 110px;
    }

    .card-copy {
        padding: 32px 24px 28px;
    }

    h1 {
        font-size: clamp(38px, 12vw, 54px);
    }

    .subtitle {
        margin: 18px 0 24px;
        font-size: 15px;
    }
}

@media (max-height: 620px) and (orientation: landscape) {
    .redirect-page {
        padding: 14px;
    }

    .community-card {
        min-height: 330px;
    }

    .brand-mark {
        min-height: 330px;
    }

    .card-copy {
        padding: 30px 42px;
    }

    h1 {
        font-size: 46px;
    }

    .subtitle {
        margin: 14px 0 18px;
    }
}

@media (prefers-reduced-motion: no-preference) {
    .community-card {
        animation: appear .65s cubic-bezier(.2, .8, .2, 1) both;
    }

    @keyframes appear {
        from {
            opacity: 0;
            transform: translateY(18px) scale(.985);
        }
        to {
            opacity: 1;
            transform: translateY(0) scale(1);
        }
    }
}
