:root {
    --grey-950: #09090B;
    --grey-900: #18181B;
    --grey-800: #27272A;
    --grey-700: #3F3F46;
    --grey-600: #52525B;
    --grey-500: #74747C;
    --grey-400: #A1A1AA;
    --grey-300: #D4D4D8;
    --grey-200: #E4E4E7;
    --grey-100: #F4F4F5;
    --grey-50: #FAFAFA;
    --sky: #0088ff;
}

/* Hide scrollbar */
::-webkit-scrollbar,
::-webkit-scrollbar-track,
::-webkit-scrollbar-thumb {
    width: 0;
    background: transparent;
    border: none;
    cursor: none;
}

/* Firefox */
* {
    scrollbar-width: none;
}

::selection {
    background: var(--sky);
    color: white;
}

/* Reset */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Base styles */
body {
    font-family: 'Inter', sans-serif;
    font-feature-settings: "lnum";
    font-variant-ligatures: none;
    -webkit-font-smoothing: antialiased;
    font-optical-sizing: auto;
    font-style: normal;
}

img, picture, video {
    max-width: 100%;
}

main {
    width: 100%;
    overflow: hidden;
}

/* Typography */
h1, h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
    color: var(--grey-950);
    margin-bottom: 0.75em;
}

h1 { margin-top: min(6vw, 1.75em); }

h3 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    text-align: center;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--grey-950);
    margin-bottom: 1.5em;
    line-height: 1.333;
}

p {
    font-size: clamp(1rem, 2vw, 1.25rem);
    font-weight: 400;
    color: var(--grey-800);
    margin-bottom: 0.5em;
    line-height: 1.5;
}

/* Layout */
section { margin-bottom: min(10vw, 10rem); }

.container,
.container-wide {
    width: 100%;
    padding: 0 20px;
    margin: 0 auto;
}

.container { max-width: 720px; }
.container-wide { max-width: 960px; }

/* Components */
.device {
    width: 100%;
    max-width: 375px;
    background: var(--grey-900);
    padding: clamp(2px, 2vw, 12px);
    border-radius: clamp(1.5rem, 12vw, 3.5rem);
}

.device-sm {
    width: 30%;
    background: var(--grey-900);
    padding: clamp(2px, 2vw, 6px);
    border-radius: clamp(1rem, 6vw, 2rem);
}

.gallery {
    display: grid;
    justify-content: center;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 20px;
}

.section-title {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.4em;
    font-weight: 600;
    text-align: center;
    color: var(--grey-400);
    margin: min(10vw, 10rem) 0;
}

.footer {
    display: flex;
    margin-top: 2rem;
    flex-direction: column;
    align-items: center;
    gap: 6rem;
}

.shadow {
    position: fixed;
    width: 100vw;
    height: 100vh;
    object-fit: cover;
    object-position: center top;
    z-index: -1;
    pointer-events: none;
}

/* Navigation */
.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 30px;
}

.menu {
    display: flex;
    gap: 0;
    margin-right: -0.5em;
}

.menu a {
    display: inline-block;
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.5;
    padding: 0.5em 1em;
    color: var(--grey-800);
    text-decoration: none;
    border-radius: 0.75em;
    transition: all 0.3s ease;
    cursor: pointer;
}

.menu a:hover {
    background: var(--grey-950);
    color: white;
}

/* Profile */
.profile {
    width: 1.125em;
    height: 1.125em;
    border-radius: 50%;
    vertical-align: text-bottom;
    margin: 0 0.125em;
}

/* Wrappers */
.wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    position: relative;
    margin-bottom: min(10vw, 10rem);
}

.wrapper-td {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    width: 100%;
    position: relative;
    margin-bottom: min(10vw, 10rem);
}

.order-swap {
    order: 0;
}

.center {
    text-align: center;
}

/* Captions */
.caption {
    max-width: 400px;
}

.caption-wide {
    max-width: 100%;
}

/* Loader */
.loader {
    position: fixed;
    inset: 0;
    background: var(--grey-50);
    z-index: 9999;
}

.loading-text {
    position: fixed;
    display: flex;
    justify-content: center;
    align-items: center;
    inset: 0;
    margin: auto;
    height: 1.414em;
    overflow: hidden;
    z-index: 10000;
}

.loading-text span {
    font-size: 1rem;
    font-weight: 600;
    opacity: 0;
    transform: translate(0, 3em) scale(1);
    color: var(--grey-950);
    z-index: 10000;
    margin: 0 0.5em;
    animation: moveAnimation 2.5s infinite ease-out;
}

@keyframes moveAnimation {
    0% { transform: translateY(3em); opacity: 0; }
    50%, 80% { transform: translateY(0); opacity: 1; }
    100% { transform: translateY(0) scale(0.5); opacity: 0; }
}

.loading-text span:nth-child(1) { animation-delay: 0s; }
.loading-text span:nth-child(2) { animation-delay: 0.12s; }
.loading-text span:nth-child(3) { animation-delay: 0.24s; }
.loading-text span:nth-child(4) { animation-delay: 0.36s; }
.loading-text span:nth-child(5) { animation-delay: 0.48s; }
.loading-text span:nth-child(6) { animation-delay: 0.6s; }
.loading-text span:nth-child(7) { animation-delay: 0.72s; }

/* buttons and links */
.button-primary,
.button-secondary {
    display: flex;
    position: relative;
    align-items: center;
    justify-content: center;
    gap: 0.75em;
    min-width: 15rem;
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.5;
    text-align: center;
    padding: 1.25em 1.75em 1.25em 1.25em;
    border-radius: 1.25em;
    text-decoration: none;
    -webkit-box-shadow: -16px 12px 40px -12px hsla(240, 10%, 30%, 0.2), 0 0 1px hsla(240, 10%, 10%, 0.2);
    box-shadow: -16px 12px 40px -12px hsla(240, 10%, 30%, 0.2), 0 0 1px hsla(240, 10%, 10%, 0.2);
    transition: all 0.3s ease;
    cursor: pointer;
}

.button-primary {
    background: var(--grey-950);
    color: white;
    z-index: 2;
}

.button-primary img {
    width: 1.5em;
    height: 1.5em;
    border-radius: 50%;
}

.button-secondary {
    background: white;
    color: var(--grey-800);
    z-index: 1;
}

.button-primary:hover,
.button-secondary:hover {
    opacity: 0.85;
    transform: scale(0.98,0.96);
}

.button-group {
    display: flex;
    justify-content: center;

    gap: 0.75rem;
}

.link-image {
    display: block;
    width: 100%;
    height: 100%;
    transition: all 0.3s ease;
}

.link-image:hover {
    opacity: 0.85;
    transform: scale(0.98);
}

.highlight-word {
    display: inline-block;
    color: white;
    font-weight: 600;
    margin: 1px 0.35em;
    border-radius: 3em;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.go-to-top {
    display: flex;
    background-color: transparent;
    color: var(--grey-800);
    border: none;
    border-radius: 16px;
    width: 48px;
    height: 48px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.go-to-top:hover {
    transform: translateY(-4px);
    background-color: var(--grey-950);
    color: white;
}

/* Videos are positioned absolutely, invisible by default */
#vidOne, #vidTwo {
    position: absolute;
    width: 200px;
    opacity: 0;
    z-index: 3;
    pointer-events: none; /* no mouse events on the video itself */
}

#jump {
    background-image: url('../images/jump.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    padding: 0 0.5em 0.15em 0.6em;
    cursor: none;
}

#explore {
    background-image: url('../images/explore.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    padding: 0 0.5em 0.15em;
    cursor: none;
}

@media screen and (max-width: 768px) {

    .navbar {
        padding: 10px 20px;
    }

    .wrapper {
        flex-direction: column;
        gap: 2rem;
    }

    .device-sm {
        width: 100%;
        max-width: 375px;
        padding: clamp(2px, 2vw, 12px);
        border-radius: clamp(1.5rem, 12vw, 3.5rem);
    }

    .order-swap {
        order: -1;
    }

    .gallery {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(3, 1fr);
        gap: 12px;
    }

    .section-title {
        font-size: .875rem;
    }

    .button-group {
        flex-direction: column;
    }

}
