:root {
    --depth-scale: 3;
    --safe: clamp(18rem, 70vw, 40rem);
    --push-scale: 1;
}

@media (max-width: 480px) {
    :root {
        --safe: clamp(6rem, 50vw, 18rem);
        --push-scale: 0.3;
    }
}

/* Main menu */

#main-menu {
    position: fixed;
    top: calc(20px + env(safe-area-inset-top));
    left: 0;
    right: 0;
    margin-inline: auto;
    width: fit-content;
    z-index: 100;
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 10px 20px;
    min-width: 320px;
    color: var(--primary-dark);
    display: flex;
    flex-direction: column;
}

#main-menu .headline {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#main-menu a {
    color: inherit;
}

#main-menu .headline ul {
    list-style: none;
    padding-left: 0;
    margin: 0 20px;
    display: flex;
    gap: 10px;
}

#main-menu .headline ul li {
    white-space: nowrap;
    flex-shrink: 0;
}

#main-menu .menu-download {
    height: 40px;
    background-color: var(--primary);
    color: white;
    padding: 10px 20px;
    border-radius: 20px;
    text-decoration: none;
    display: flex;
    justify-content: center;
    align-items: center;
}

#main-menu .menu-download svg {
    display: inline-block;
    width: 20px;
    height: 20px;
    fill: var(--token-a0b108d1-905f-48b6-9b39-89b275654751, rgb(252, 252, 250));
    color: var(--token-a0b108d1-905f-48b6-9b39-89b275654751, rgb(252, 252, 250));
}

#main-menu .menu-content {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 300ms var(--ease-out-3);
}

#main-menu.is-open .menu-content {
    grid-template-rows: 1fr;
}

#main-menu .menu-content-inner {
    overflow: hidden;
    min-height: 0;
    display: flex;
    justify-content: space-between;
    align-items: end;
    visibility: hidden;
    transition: visibility 300ms;
}

#main-menu.is-open .menu-content-inner {
    visibility: visible;
}

#main-menu .menu-content ul {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

#main-menu .menu-content .menu-links li {
    margin-top: 10px;
}

#main-menu .menu-content .social svg {
    width: 16px;
    height: 16px;
    fill: var(--primary-dark);
}

.menu-toggle {
    display: none;
    grid-template-columns: repeat(3, auto);
    gap: 5px;
    padding: 8px;
    background: none;
    border: none;
    cursor: pointer;
    color: inherit;
}

.menu-toggle .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    transition: transform 300ms var(--ease-out-3), opacity 300ms var(--ease-out-3);
}

#main-menu.is-open .dot:not(:nth-child(5)) {
    transform: scale(0);
    opacity: 0;
}

#main-menu.is-open .dot:nth-child(5) {
    transform: scale(1.6);
}

@media (min-width: 480px) {
    #main-menu .menu-download svg {
        display: none;
    }
}

@media (max-width: 480px) {
    #main-menu .headline ul {
        display: none;
    }

    .menu-toggle {
        display: grid;
    }

    #main-menu .menu-download {
        width: 40px;
        padding: 0;
    }

    #main-menu .menu-download span {
        display: none;
    }
}

/* Main title */

#download h1>span {
    display: block;
}

.spin {
    display: inline-block;
    animation: wobble-3d 2s ease-in-out infinite alternate;
}

@keyframes wobble-3d {
    from {
        transform: perspective(600px) rotateY(0) rotateX(0);
    }

    to {
        transform: perspective(600px) rotateY(10deg) rotateX(5deg);
    }
}

div#download {
    min-height: 100vh;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 100px 0;
    position: relative;
    isolation: isolate;
    overflow-x: clip;
}

/* Hero video */

#video {
    padding: 100px 0;
    display: flex;
    justify-content: center;
    perspective: 1200px;

    position: relative;
    isolation: isolate;
    overflow-x: clip;
}

#video video {
    display: block;
    width: 70%;
    max-width: 1200px;
    height: auto;
    border-radius: var(--radius-4);
}

@media (max-width: 480px) {
    #video video {
        width: 90%;
        border-radius: var(--radius-3);
    }
}

@media (prefers-reduced-motion: no-preference) {
    @supports (animation-timeline: view()) {
        #video video {
            transform-origin: center bottom;
            animation: video-tilt linear both;
            animation-timeline: view();
            animation-range: entry 0% cover 50%;
        }
    }
}

@keyframes video-tilt {
    from {
        transform: rotateX(45deg);
    }

    to {
        transform: rotateX(0deg);
    }
}

/* Explore */

#explore {
    min-height: 100vh;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;

    position: relative;
    isolation: isolate;
    overflow-x: clip;
}

/* Why Blitz */

#why-blitz {
    min-height: 100vh;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 50px;
    justify-content: center;
    align-items: center;
    padding: 100px 0;
}

#why-blitz-content {
    display: flex;
    justify-content: center;
    gap: 50px;
}

#why-blitz-content-menu ul {
    list-style: none;
    padding-left: 0;
    width: 340px;
}

#why-blitz-content-menu button {
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    color: inherit;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    height: 100px;
}

#why-blitz-content-menu button.is-active {
    border-bottom: 1px solid rgba(255, 255, 255, 0.5);
}

#why-blitz-content-menu button:not(.is-active) {
    opacity: 0.4;
}

#why-blitz-content-menu .tab-number {
    font-family: var(--font-body-narrow);
    font-weight: 500;
    font-size: 16px;
}

#why-blitz-content-menu .tab-title {
    flex: 1;
    text-transform: uppercase;
}

#why-blitz-content-menu .chevron {
    opacity: 0;
    transform: scale(0.5);
}

#why-blitz-content-menu button.is-active .chevron {
    opacity: 1;
    transform: scale(1);
}

#why-blitz-content-details {
    background-color: var(--primary);
    border-radius: var(--radius-3);
    width: 50%;
    padding: 40px;
    text-align: left;
}

#why-blitz-content-details .why-panel {
    gap: 20px;
}

#why-blitz-content-details .why-panel ul {
    margin-top: 20px;
    padding-left: 0;
}

#why-blitz-content-details .why-panel ul li {
    display: inline-block;
    font-family: var(--font-body-narrow);
    font-weight: 500;
    font-size: 16px;
    margin-right: 20px;
}

#why-blitz-content-details .why-panel ul li::before {
    content: "•";
    margin-right: 10px;
}

#why-blitz-content-details .why-panel img {
    width: 40%;
    height: auto;
    align-self: center;
}

.js .why-panel {
    display: none;
}

.js .why-panel.is-active {
    display: flex;
}

@media (max-width: 1024px) {
    #why-blitz-content {
        flex-direction: column;
        align-items: center;
    }

    #why-blitz-content-menu {
        width: 100%;
    }

    #why-blitz-content-menu ul {
        /* display: block; */
        width: auto;
        margin: 0 20px;
    }

    #why-blitz-content-details {
        width: auto;
        margin: 0 20px;
    }
}

@media (max-width: 768px) {
    #why-blitz-content-details .why-panel {
        flex-direction: column;
    }

    #why-blitz-content-details .why-panel img {
        margin: 0 auto;
    }
}

@media (max-width: 480px) {
    #why-blitz-content-details {
        padding: 20px;
    }

    #why-blitz-content-details .why-panel img {
        width: 100%;
    }
}

/* What is Blitz */

#what-is-blitz {
    min-height: 100vh;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 100px 0;
}

#what-cards {
    display: flex;
    justify-content: center;
    gap: 20px;
}

@media (max-width: 480px) {
    #what-cards {
        flex-direction: column;
        align-items: center;
    }
}

#what-cards .card {
    position: relative;
    width: clamp(200px, 20vw, 300px);
}


#what-cards .card .screen {
    width: 100%;
    height: auto;
    border-radius: var(--radius-2);
}

#what-cards .card .header {
    width: 100%;
    height: auto;
    position: absolute;
    top: 0;
    left: 0;
}

@media (prefers-reduced-motion: no-preference) {
    @supports (animation-timeline: view()) {
        #what-cards .card .header {
            animation: header-drift linear both;
            animation-timeline: view();
            animation-range: cover;
        }
    }
}

@keyframes header-drift {
    from {
        transform: translateY(20px);
    }

    to {
        transform: translateY(-20px);
    }
}

/* Let's Play */

#lets-play {
    padding: 100px 0;
    min-height: 100vh;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 50px;
    background-color: var(--primary-light);
}

#lets-play h1 {
    margin-bottom: 0;
}

#lets-play-qr {
    display: flex;
    align-items: center;
    gap: 50px;
}

#lets-play-qr>img {
    width: 250px;
    height: auto;
}

#lets-play-qr>h1 {
    text-align: left;
}

@media (min-width: 480px) {
    #lets-play>h1 {
        display: none;
    }
}

@media (max-width: 480px) {
    #lets-play-qr>h1 {
        display: none;
    }
}

/* Flying items */

.flyer {
    position: absolute;
    z-index: 1;
    width: var(--w, 180px);
    height: auto;
    pointer-events: none;
}

.miniature {
    border-radius: var(--radius-3);
    width: clamp(100px, 20vw, 200px);
}

.bill {
    filter: blur(var(--blur, 0));
}

.side-left {
    right: calc(50% + var(--safe) / 2 + var(--push, 0px) * var(--push-scale, 1));
}

.side-right {
    left: calc(50% + var(--safe) / 2 + var(--push, 0px) * var(--push-scale, 1));
}

@media (prefers-reduced-motion: no-preference) {
    @supports (animation-timeline: view()) {
        .flyer {
            animation: flyer-drift linear both;
            animation-timeline: view();
            animation-range: cover;
        }

        .bill {
            animation-name: bill-drift;
        }
    }
}

@keyframes flyer-drift {
    from {
        transform: translateY(calc(var(--depth, 80) * var(--depth-scale, 1) * 1px));
    }

    to {
        transform: translateY(calc(var(--depth, 80) * var(--depth-scale, 1) * -1px));
    }
}

@keyframes bill-drift {
    from {
        transform: translateY(calc(var(--depth, 80) * var(--depth-scale, 1) * 1px)) rotate(var(--rot-from, 0deg));
    }

    to {
        transform: translateY(calc(var(--depth, 80) * var(--depth-scale, 1) * -1px)) rotate(var(--rot-to, 0deg));
    }
}
