@import url('https://fonts.googleapis.com/css2?family=Schoolbell&amily=Indie+Flower&display=swap');

:root {
    --grad: 0.6;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: content-box;
    font-family: 'Schoolbell', cursive, sans-serif;
    letter-spacing: 0.25ch;
    transition: all 0.25s ease;
}

h1, h2, h3, .title {
    font-family: 'Indie Flower', cursive, sans-serif;
}

body {
    background-color: var(--md-primary-container);
    color: var(--md-on-primary-container);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: stretch;
    min-height: 100vh;
    overflow: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

a:hover {
    text-decoration: underline;
}



.bg {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(0, 0, 0, var(--grad)) 0%, rgba(0, 0, 0, 0) 30%, rgba(0, 0, 0, 0) 70%, rgba(0, 0, 0, var(--grad)) 100%);
    z-index: -1;
}

.glass {
    z-index: -2;
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: color-mix(in srgb, var(--md-primary-container), transparent 30%);
    -webkit-backdrop-filter: blur(0.15rem);
    backdrop-filter: blur(0.15rem);
}

.dark-toggle {
    font-size: 1.5rem;
    position: absolute;
    padding: 0.5rem;
    right: 1rem;
    top: 1rem;
    cursor: pointer;
    border-radius: 0.5rem;
    border: 0.01rem solid var(--md-outline);
    background-color: var(--md-surface);
    background-color: color-mix(in srgb, var(--md-surface), transparent 50%);
    color: var(--md-on-surface);
    z-index: 2;
}

.dark-toggle:hover {
    background-color: var(--md-surface-variant);
    color: var(--md-on-surface-variant);
}

h1.title {
    font-size: 4rem;
    text-align: center;
    padding: 0 3rem;
}

.rainbow {
    font-family: 'Indie Flower', cursive, sans-serif;
    letter-spacing: 0.35ch;
    font-weight: 800;
    cursor: pointer;
}

.rainbow-1 {
    color: violet;
}

.rainbow-2 {
    color: indigo;
}

.rainbow-3 {
    color: blue;
}

.rainbow-4 {
    color: green;
}

.rainbow-5 {
    color: black;
}

.rainbow-6 {
    color: orange;
}

.rainbow-7 {
    color: red;
}

.material-symbols-rounded {
    font-variation-settings: "FILL" 0;
    cursor: pointer;
}

.active-icon {
    font-variation-settings: "FILL" 1;
}

main {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
}

.boxes {
    position: absolute;
    display: flex;
    flex-direction: column;
    height: 100vh;
    justify-content: center;
    gap: 2rem;
    overflow: hidden;
    z-index: 1;
}

.box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    max-width: 70ch;
    color: var(--md-on-secondary-container);
    padding: 1rem;
    border-radius: 1rem;
}

.box:hover {
    border: 0.01rem solid var(--md-outline);
}

.boxes.left {
    left: 2rem;
    align-items: flex-start;
}

.boxes.right {
    right: 2rem;
    align-items: flex-end;
}

.box .text {
    transition: font-size 0.15s ease-in-out;
    font-size: 0;
}

.box .icon {
    font-size: 2rem;
    line-height: 0;
}

.idle {
    animation: float 3s linear infinite;
}

.box.active .icon, .box:hover .icon {
    animation: none;
}

.box.active .text {
    padding-top: 0.5rem;
    font-size: 1rem;
}

.box.active .text h2 {
    font-size: 1.5rem;
}

.box.active .text h3 {
    font-size: 1.2rem;
}

.box.active .text p {
    padding-top: 0.5rem;
    font-weight: 400;
}

.box.active .material-symbols-rounded {
    font-variation-settings: "FILL" 1;
}

.box.active {
    background-color: var(--md-secondary-container);
    border: 0.01rem solid var(--md-outline);
}

.vid-wrapper {
    height: 100%;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    position: absolute;
    z-index: -3;
    top: 0;
    left: 0;
    overflow: hidden;
}

.vid-wrapper video {
    height: 100%;
    width: 100%;
    object-fit: cover;
    object-position: center;
    display: none;
}

video.active-vid {
    display: block;
}

.controls {
    position: absolute;
    bottom: 2rem;
    right: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    z-index: 2;
}

.btns {
    display: flex;
    justify-content: center;
    gap: 1rem;
    font-size: 1rem;
    color: color-mix(in srgb, var(--md-secondary-fixed), transparent 50%);
}

.btn:hover {
    color: color-mix(in srgb, var(--md-secondary-fixed), transparent 0%);
    transform: scale(1.1);
}

.progress {
    align-self: stretch;
    background-color: color-mix(in srgb, var(--md-secondary-fixed), transparent 50%);
    height: 0.35rem;
    border-radius: 2rem;
    padding: 0.1rem;
    opacity: 0.7;
}

.indicator {
    background-color: var(--md-secondary-fixed);
    width: 33%;
    height: 100%;
    border-radius: 1rem;
    position: relative;
    left: 0%;
}

.ind-1 {
    left: 0%;
}

.ind-2 {
    left: 33%;
}

.ind-3 {
    left: 67%;
}

@keyframes float {
    from {
        transform: rotate(0deg) translateY(-0.25rem) rotate(0deg);
    }
    to {
        transform: rotate(360deg) translateY(-0.25rem) rotate(-360deg);
    }
}

@media (max-width: 1080px) {
    :root {
        font-size: 12px;
    }

    .boxes {
        flex-direction: row;
        justify-content: center;
        align-items: flex-end;
        gap: 2rem;
        height: auto;
        width: 100%;
    }

    .boxes.left {
        left: 0;
        bottom: 2rem;
        align-items: flex-end;
    }
    .boxes.right {
        right: 0;
        bottom: 7.5rem;
    }

    .boxes.left:has(.active) {
        bottom: 7.5rem;
    }

    .boxes.left:has(.active) ~ .boxes.right {
        bottom: 2rem;
    }
    
    .boxes.right:has(.active) {
        bottom: 7.5rem;
    }

    .boxes.right:has(.active) ~ .boxes.left {
        bottom: 2rem;
    }

    .vid-wrapper video {
        object-position: 15% center;
    }
}

@media (max-width: 576px) {
    :root {
        font-size: 10px;
    }
}

@media (max-width: 360px) {
    :root {
        font-size: 8px;
    }

    .controls {
        top: 2rem;
        left: 2rem;
        bottom: auto;
        right: auto;
        flex-direction: column-reverse;
    }
}