:root {
    --black: #050203;
    --dark-red: #240307;
    --deep-red: #5f0b15;

    --red: #a3222e;
    --red-hover: #bb2b38;
    --red-active: #881923;

    --petal-light: #ffadb9;
    --petal-dark: #d95b75;

    --white: #ffffff;
}

* {
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    min-height: 100%;
    margin: 0;
}

body {
    position: relative;

    min-height: 100vh;

    overflow: hidden;

    display: grid;
    place-items: center;

    font-family:
        Arial,
        Helvetica,
        sans-serif;

    background:
        radial-gradient(
            circle at 50% 20%,
            rgba(220, 60, 72, 0.42),
            transparent 32rem
        ),
        radial-gradient(
            circle at 15% 40%,
            rgba(116, 19, 34, 0.4),
            transparent 30rem
        ),
        linear-gradient(
            155deg,
            var(--black) 0%,
            var(--dark-red) 38%,
            var(--deep-red) 70%,
            #170204 100%
        );
}

/* Slow background movement */

body::before {
    content: "";

    position: fixed;
    inset: -35%;

    z-index: 0;

    pointer-events: none;

    background:
        conic-gradient(
            from 180deg at 50% 42%,
            transparent,
            rgba(255, 70, 85, 0.1),
            transparent 34%,
            rgba(100, 10, 24, 0.22),
            transparent 72%
        );

    filter: blur(55px);

    animation:
        background-rotate
        28s
        linear
        infinite;
}

/* Dark edge vignette */

body::after {
    content: "";

    position: fixed;
    inset: 0;

    z-index: 0;

    pointer-events: none;

    background:
        radial-gradient(
            circle at center,
            transparent 35%,
            rgba(0, 0, 0, 0.72) 100%
        );
}

/* Main page */

.page {
    position: relative;
    z-index: 2;

    width: min(
        900px,
        calc(100% - 32px)
    );

    display: flex;
    flex-direction: column;

    align-items: center;
    justify-content: center;

    text-align: center;
}

/* Bushido logo */

.logo {
    display: block;

    width: min(760px, 92vw);
    max-height: 62vh;

    object-fit: contain;

    filter:
        drop-shadow(
            0 0 18px
            rgba(255, 55, 70, 0.35)
        )
        drop-shadow(
            0 24px 42px
            rgba(0, 0, 0, 0.72)
        );

    animation:
        logo-float
        4.5s
        ease-in-out
        infinite;
}

/* Download link */

.download-link {
    position: relative;
    z-index: 3;

    margin-top: 42px;

    color: inherit;
    text-decoration: none;

    border-radius: 6px;
}

/* Flat download button */

.download-button {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    gap: 0.8rem;

    min-width: 12rem;
    min-height: 3.25rem;

    padding:
        0.9rem
        1.5rem;

    border-radius: 6px;

    background: var(--red);

    color: var(--white);

    cursor: pointer;

    transition:
        background-color 0.16s ease,
        transform 0.16s ease;
}

/* Download icon wrapper */

.download-icon-wrapper {
    position: relative;

    display: block;

    width: 1.4rem;
    height: 1.4rem;

    flex: 0 0 1.4rem;
}

/* Download arrow stem */

.download-icon {
    position: absolute;

    left: 50%;
    top: 0.05rem;

    width: 0.16rem;
    height: 0.82rem;

    border-radius: 2px;

    background: var(--white);

    transform:
        translateX(-50%);
}

/* Download arrow head */

.download-icon::before {
    content: "";

    position: absolute;

    left: -0.24rem;
    bottom: -0.02rem;

    width: 0.52rem;
    height: 0.52rem;

    border-right:
        0.16rem solid
        var(--white);

    border-bottom:
        0.16rem solid
        var(--white);

    transform: rotate(45deg);
}

/* Download tray */

.download-icon::after {
    content: "";

    position: absolute;

    left: -0.42rem;
    bottom: -0.46rem;

    width: 1rem;
    height: 0.16rem;

    border-radius: 999px;

    background: var(--white);
}

/* Download text */

.button-text {
    color: var(--white);

    font-size: 1rem;
    font-weight: 800;

    line-height: 1;

    letter-spacing: 0.08em;

    text-align: center;
    text-transform: uppercase;
}

/* Simple button interactions */

.download-link:hover .download-button {
    background: var(--red-hover);

    transform:
        translateY(-2px);
}

.download-link:active .download-button {
    background: var(--red-active);

    transform:
        translateY(0);
}

.download-link:focus-visible {
    outline:
        2px solid
        var(--white);

    outline-offset: 5px;
}

/* Falling petals */

.petal {
    position: fixed;

    z-index: 1;

    top: -40px;

    width: 12px;
    height: 18px;

    pointer-events: none;

    border-radius:
        80%
        10%
        80%
        10%;

    background:
        linear-gradient(
            135deg,
            var(--petal-light),
            var(--petal-dark)
        );

    filter:
        drop-shadow(
            0 2px 3px
            rgba(0, 0, 0, 0.3)
        );

    animation-name:
        petal-fall;

    animation-timing-function:
        linear;

    animation-iteration-count:
        infinite;
}

/* Animations */

@keyframes logo-float {
    0%,
    100% {
        transform:
            translateY(0);
    }

    50% {
        transform:
            translateY(-9px);
    }
}

@keyframes background-rotate {
    to {
        transform:
            rotate(360deg);
    }
}

@keyframes petal-fall {
    0% {
        transform:
            translate3d(
                0,
                -12vh,
                0
            )
            rotate(0deg)
            scale(
                var(--petal-scale, 1)
            );
    }

    40% {
        transform:
            translate3d(
                calc(
                    var(--petal-drift, 60px) * 0.4
                ),
                45vh,
                0
            )
            rotate(250deg)
            scale(
                var(--petal-scale, 1)
            );
    }

    70% {
        transform:
            translate3d(
                calc(
                    var(--petal-drift, 60px) * -0.2
                ),
                82vh,
                0
            )
            rotate(480deg)
            scale(
                var(--petal-scale, 1)
            );
    }

    100% {
        transform:
            translate3d(
                var(--petal-drift, 60px),
                118vh,
                0
            )
            rotate(720deg)
            scale(
                var(--petal-scale, 1)
            );
    }
}

/* Mobile */

@media (max-width: 600px) {
    .logo {
        width: 94vw;
        max-height: 58vh;
    }

    .download-link {
        margin-top: 28px;
    }

    .download-button {
        min-width: 11rem;
    }
}

/* Reduced-motion accessibility */

@media (prefers-reduced-motion: reduce) {
    body::before,
    .logo,
    .petal {
        animation: none;
    }

    .download-button {
        transition: none;
    }
}