:root {
    font-size: 1rem;
    background: rgb(184 193 215);

    color-scheme: dark;
}

* {
    transition: all 0.5s;
    font-family: "Figtree", sans-serif;
    color: white;
}

@property --grad-1 {
    syntax: '<color>';
    initial-value: rgb(184 193 215);
    inherits: true;
}

@property --grad-2 {
    syntax: '<color>';
    initial-value: rgb(247 177 176);
    inherits: true;
}

body {
    --grad-1: rgb(184 193 215);
    --grad-2: rgb(247 177 176);
    margin: 0;
    padding: 0;
    height: 100svh;
    max-height: 100svh;
    overflow: hidden auto;
    background: center/cover linear-gradient(var(--grad-1) 0%, var(--grad-2) 100%) no-repeat;

    position: relative;
    transition-timing-function: linear;

    transition: --grad-1 15s, --grad-2 15s;
}

/* The background */
body::before {
    content: "";
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;

    background-image: url("static/mountain.svg");

    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    filter: hue-rotate(360deg);

    transition: filter 15s;
}

@media screen and (min-aspect-ratio:16/9) {
    body::before {
        background-size: 101%;
    }
}

body.sunset::before {
    filter: hue-rotate(350deg);
}

body.night::before {
    filter: hue-rotate(335deg);
}

body.sunset {
    --grad-1: rgb(12, 24, 87);
    --grad-2: rgb(129, 59, 8);
}

body.night {
    --grad-1: rgb(4, 11, 48);
    --grad-2: rgb(12, 24, 87);
}

#outer {
    display: flex;
    height: 100svh;
    padding: 2rem;
    box-sizing: border-box;
    position: relative;
    z-index: 2;
}

#container {
    padding: 1rem;
    border-radius: 1rem;
    align-items: center;
    gap: 2rem;
}

#email-add {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

input,
button, .button {
    background: #0005;
    border: 1px #bbb solid;
    border-radius: 0.5rem;
    backdrop-filter: blur(1rem);
    -webkit-backdrop-filter: blur(1rem);
    position: relative;
    top: 0;
    transition: top 0.1s, all 0.2s;

    padding: 0.5rem;
    font-size: 1rem;
}

a.button {
    display:inline-block;
    &:hover {
        text-decoration: none;
    }
}

button[disabled] {
    background: #bbb5;

    &:hover {
        cursor: not-allowed;
    }
}

button:hover, .button:hover {
    cursor: pointer;
    background: #ccc5;
}

button:active:not([disabled]), .button:active:not([disabled]) {
    top: 0.1rem;
}

#desc a {
    color: #cdf;
    text-decoration: none;
}

#desc a:hover {
    text-decoration: underline;
}

/* #container h3 {
    font-weight: 500;
} */

img#icon {
    position: absolute;
    width: 6rem;
    margin: 1rem;
}

#container h1 {
    font-size: 6rem;
    margin: 4rem 0 1rem 0;
}

#container h2 {
    font-size: 2.5rem;
    font-style: italic;
    font-weight: 200;
    margin: 0;
    margin-bottom: 1rem;
}

#desc {
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(1rem);
    -webkit-backdrop-filter: blur(1rem);
    border-radius: 1rem;
    padding: 1rem;
    max-width: 50ch;
}

#desc p {
    font-size: 1.1rem;
    margin: 0;
}

#desc h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

#container h1.but-blue {
    color: rgb(62, 151, 192);
}

.button.register {
    font-size:20pt;
    padding: 1rem;
    letter-spacing: 0.05rem;
    margin-top:1rem;
    border-radius: 1rem;
    background:none;
    background-image: linear-gradient(90deg, rgba(61, 76, 119, 0.9) 50%, #0005 50%);
    background-size: 200%;
    background-position-x: 100%;
    border:2px solid white;
    text-decoration: none;

    &:hover {
        background-position-x: 0%;
    }
}

.button.register i {
    position: relative;
    left:0;
    transition:left 0.1s;
}
.button.register:hover i {
    left:5px;
}

@media screen and (max-width:749px) and (max-aspect-ratio:1.5) {
    #outer {
        padding: 2rem 1rem 1rem 1rem;
    }

    #container h1 {
        font-size: 10vw;
        text-align: center;
        margin-top: 6rem;
        margin-bottom: 0;
        border-radius: 10rem;
        padding: 0.5rem 1.5rem;
        background: rgba(0, 0, 0, 0.2);
        backdrop-filter: blur(1rem);
        -webkit-backdrop-filter: blur(1rem);
    }

    #container h1.but-blue {
        color: #5ac7fa;
    }

    #container h2 {
        font-size: 4vw;
        background: rgba(0, 0, 0, 0.2);
        backdrop-filter: blur(1rem);
        -webkit-backdrop-filter: blur(1rem);
        padding: 1rem;
        border-radius: 10rem;
        margin-top: 1rem;
        margin:0;
    }

    #container {
        display: flex;
        flex-direction: column;
        justify-items: center;
        width: 100%;
    }

    .button.register {
        margin:0;
        border-radius:4rem;
    }
}

@media screen and (max-height:650px) and (min-aspect-ratio:1.5) {
    img#icon {
        width: 4rem;
    }

    #container h1 {
        margin-top: 2rem;
        margin-bottom: 0;
        font-size: 14svh;
    }

    #container h2 {
        font-size: 7svh;
    }

    :root {
        font-size: calc(min(1rem, 4svh));
    }
}

#birdy {
    display: none;
    position: absolute;
    width: 100px;
    z-index: 0;
    top: 0px;
    right: -200px;
}

#container h1 {
    z-index: 2;
    position: relative;
}

#icon-mobile {
    display: none;
}

@media screen and (max-width:500px) {
    #icon {
        display: none;
    }

    #container h1 {
        margin: 0;
    }
}

@media screen and (max-width:500px) and (max-aspect-ratio:1) {
    #icon-mobile {
        display: block;
        position: relative;
        max-width: 100%;
        min-height: 0;
        z-index: 0;
        margin: 0 2rem;
        box-sizing: border-box;
        flex-grow: 1;
    }


    #container {
        flex-direction: column;
        justify-content: space-around;
        gap: 0.5rem;
        box-sizing: border-box;
        min-height: 100svh;
        height: 100svh;
        max-height: 100svh;
        padding: 2rem;

        overflow: hidden;
    }

    #outer {
        padding: 0;
    }

}

button *, .button * {
    padding: 0;
    margin: 0;
}



dialog {
    background-color: #0005;
    backdrop-filter: blur(10px);
    padding: 1rem;
    box-sizing: border-box;

}

@media screen and (min-width:501px) and (min-height:401px) {
    dialog {
        min-width: calc(min(max(50%, 80ch), 100vw - 4rem));
        max-width: calc(100vw - 4rem);
        max-height: calc(100vh - 4rem);
        border-radius: 1rem;
        border: 1px solid white;
    }

    #faqs {
        width: calc(100vw - 4rem);
    }

    dialog::backdrop {
        backdrop-filter: blur(5px);
        -webkit-backdrop-filter: blur(5px);
    }
}

@media screen and (max-width:500px),
(max-height:400px) {
    dialog {
        border: none;
        margin: 0;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        box-sizing: border-box;
        min-width: 100vw;
        min-height: 100svh;
        padding: 1.5rem;
    }


}

dialog h1 {
    margin: 0;
    font-size: 3rem;
    text-align: center;
}

dialog button.close {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 1.25rem;
    position: absolute;
    z-index: 3;
    top: 1.5rem;
    right: 1.5rem;

    &:active {
        top: 1.6rem;
    }

    &:hover {
        background: #ccc5;
    }
}

div.checkbox {
    width: 1.25rem;
    height: 1.25rem;
    min-width: 1.25rem;
    min-height: 1.25rem;

    display: inline-flex;
    border-radius: 0.25rem;

    background-color: #0003;
    backdrop-filter: blur(10px);
    border: 1px white solid;
    overflow: hidden;

    align-items: center;
    justify-content: center;

    position: relative;
    top: 0;

    transition: top 0.04s;
}

div.checker {
    margin: 0.75rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;

    &:hover {
        cursor: pointer;
    }
}

div.checker:hover div.checkbox {
    background-color: #666d;
}

div.checkbox-inner {
    display: flex;
    background-color: #3a7acf;
    width: 0;
    height: 0;
    transition: width .2s, height .2s, transform .2s;
    font: "Figtree";
    font-size: 1rem;
    font-weight: 900;
    justify-content: center;
    align-items: center;
    overflow: hidden;

    border-radius: 0.5rem;
    transform: rotateZ(-90deg);
    transform-origin: center;

    box-sizing: border-box;
}

div.checker.checked div.checkbox-inner {
    width: 2rem;
    height: 2rem;
    transform: rotateZ(0deg);
}

div.checker:active:not(#other) div.checkbox,
#other div.checkbox:active {
    top: 0.1rem;
}

#visit-form {
    user-select: none;
}

dialog[open] input {
    width: calc(min(100%, 30ch));
    font-size: 1.25rem;
    padding: .25rem;
}

dialog[open] button,
dialog[open] input {
    background: #0003;
}

dialog {
    opacity: 0;
    transition: all .5s;
}

dialog:not([open]) {
    display: block;
    max-width: 0;
    max-height: 0;
    overflow: hidden;
    margin: 0;
    padding: 0;
    position: absolute;
    top: 0;
    left: 0;
    z-index: -100;
}

dialog[open] {
    opacity: 1;
}

footer {
    display: block;
    position: absolute;
    bottom: 0.5rem;
    left: 0.5rem;
    z-index: 2;
}

footer p {
    margin: 0;
    color: rgb(55, 33, 29);
    font-style: italic;
    font-weight: 200;
}

#buttons {
    display: flex;
    position: fixed;
    box-sizing: border-box;
    top: unset;
    bottom: 0.5rem;
    right: 0.5rem;
    z-index: 2;
    flex-direction: row;
    gap: .5rem;
}

.section-button {
    box-sizing: border-box;
    z-index: 2;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 0;
    transition: gap .5s;
    height: 2.5rem;
    aspect-ratio: 1;
    font-size: 1.25rem;
}

.section-button span {
    width: 0;
    overflow: hidden;
    transition: width .5s;
}

.section-button:hover {
    gap: 0.5rem;
}

#faq-button:hover span {
    width: 4.2ch;
}

#schedule-button:hover span {
    width: 7ch;
}

#sponsor-button:hover span {
    width:7ch;
}

@media screen and (min-width: 1000px) {
    .section-button {
        gap: 0.5rem;
    }

    #faq-button span {
        width: 4.2ch;
    }

    #schedule-button span {
        width: 7ch;
    }

    #sponsor-button span {
        width:7ch;
    }
}

.section-button:active {
    bottom: 0.4rem;
}

.popup details:first-of-type {
    border-top: 1px solid white;
}

details {
    border-bottom: solid white 1px;
    border-left: solid white 1px;
    border-right: solid white 1px;
    background-color: #0002;
}

details summary {
    display: block;
    transition: all 0.2s, border-bottom 0s;
    background: #0005;
}

details[open] summary {
    border-bottom: 1px solid white;
    background: #6665;
}

details summary:hover {
    background: #ccc5;
}

details * {
    padding: 0.5rem;
    box-sizing: border-box;
}

details summary:hover {
    cursor: pointer;
}

.popup details:first-of-type {
    border-radius: .5rem .5rem 0 0;
}

.popup details:first-of-type summary {
    border-radius: .5rem .5rem 0 0;
}

.popup details:last-of-type {
    border-radius: 0 0 .5rem .5rem;
}

.popup details:last-of-type:not([open]) summary {
    border-radius: 0 0 .5rem .5rem;
}

.popup h1 {
    margin-bottom: 2rem;
}

.popup {
    font-size: 1.25rem;
}

table {
    border: 1px solid white;
    width: 100%;
    margin-top: 1rem;
    border-spacing: 0;
    border-radius: .5rem;
    overflow: hidden;
}

thead td {
    background-color: #111c;
    border-bottom: 1px solid white;
}

td {
    padding: .5rem;
}

tbody td {
    background-color: #222a;
}

tbody tr:nth-child(2n) td {
    background-color: #333a;
}

tr td:nth-child(1) {
    width: 8ch;
}

dialog a {
    padding: 0;
}

dialog a:hover {
    color: #76aef8;
}

.sponsors {
    font-size:0.74rem;
}

.gold h2 {
    color:gold;
}

.silver h2 {
    color:silver;
}

.bronze h2 {
    color:rgb(177,136,47);
}

div.sponsor-section {
    display: flex;
    flex-direction:row;
    gap:2rem;
    justify-content:space-evenly;
}

.sponsor-section a{
    width: 95%;
    transition: all 0.1s;
    display: flex;
    justify-content: center;
}

.sponsor-section a img {
    max-height:10rem;
}

.sponsor-section a:hover {
    scale:105%;
}