@import url("/share/vars.css");

html {
    max-width: 100vw;
    overflow-x: hidden;
    min-height: 100dvh;
    scroll-behavior: smooth;
    color: var(--primary-color);
    background-color: var(--bg-color);
    gap: 2em;
}

header {
    margin: 5em 2em 0;
    max-width: 100%;
    min-height: 60dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    /* gap: 2em; */
    position: relative;
    border-radius: var(--corner-radius);
    overflow: hidden;

    padding-top: 1em;
}
header h1 {
    font-size: 3.25em;
    position: relative;
    text-wrap: nowrap;  
}

header h1::after {
    content: "";
    width: 6em;
    height: 30%;
    position: absolute;
    bottom: 5px;
    right: -2px;
    background: var(--g);
    z-index: -1;
}

.header-bg {
    bottom: 0;
    width: 100%;
    height: 100%;
    position: absolute;
    background-image: linear-gradient(
        to bottom,
        var(--bg-color) 10%,
        var(--theme-color)
    );
    filter: blur(5px);
    display: flex;
    justify-content: center;
    z-index: -1;
}
.header-bg-circle {
    width: 200em;
    height: 200em;
    bottom: 20em;
    position: absolute;
    background: var(--bg-color);
    filter: blur(50px);
    border-radius: 80% 65% 90% 60%;
    animation: header-bg-circle-animation 10s linear infinite;
}
@keyframes header-bg-circle-animation {
    to {
        rotate: 360deg;
    }
}

nav {
    width: 300px;
    max-width: 80vw;
    height: 60px;
    position: fixed;
    top: 0;
    border-radius: 0px 0px var(--corner-radius) var(--corner-radius);
    overflow: hidden;
    z-index: 2;

    background-color: var(--nav-color);
    border-width: 0 3px 2px 3px;
    border-color: rgba(141, 141, 141, 0.5);
    border-style: solid;
    backdrop-filter: blur(20px);

    transform-origin: top;
    transition: all 1s var(--spring-animation-function);
}

.nav-logo {
    padding: 0 2em;
    max-width: 100%;
    height: 100%;
    display: flex;
    justify-content: space-around;
    align-items: center;
    gap: 1em;
}

.nav-logo img {
    height: 90%;
}

.nav-logo hr {
    margin-left: -1em;
    height: 50%;
}

.nav-logo svg {
    height: 50%;
}

.nav-search-bar {
    padding: 1em 2em 2em 2em;
    opacity: 0;
    transition: transform 0.3s, opacity 0.3s 0.2s;
}

.nav-search-bar input {
    width: 100%;
    height: 30px;
    padding-left: 1em;
    border-radius: var(--corner-radius);
    border: none;
    outline: none;
    background-color: var(--primary-color);
}

.nav-search-bar input::placeholder {
    font-size: 0.8em;
    color: var(--bg-color);
}

/* effects */
nav:hover {
    /* width animation */
    transform: scale(1.35);
    max-width: 100%;
}

nav:hover .nav-logo {
    display: none;
}

nav:hover .nav-search-bar {
    display: block;
    opacity: 1;
}

#header-animation {
    width: 50%;
    max-width: 80%;
    position: absolute;
    bottom: -10%;
    scale: 1.5;
}

#header-animation {
    background-color: var(--bg-color);
    max-width: 50%;
    min-height: 20em;

    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 1em;
    text-align: center;

    z-index: -1;
    margin: 0 auto;
    padding: 2em;
    position: relative;
    bottom: 10em;
    border-radius: var(--corner-radius);
}


main {
    margin: 15em 0 10em;
    padding: 0 2em;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 5em;
}
main section {
    display: flex;
    justify-content: space-around;
    min-height: 40em;
    gap: 2em;
}

main section .section-description {
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    font-size: 2em;
}
main section .section-description h2 {
    font-size: 2em;
    justify-content: center;
}
.section-description .legend {
    display: inline-block;
    margin-left: 3px;
    vertical-align: super;
    width: max-content;
    font-size: 0.5em;
    color: var(--secondary-color);
    font-weight: 400;
    color: var(--primary-color);
    padding: 2px 8px;
    background-color: var(--g);
    border-radius: 10px;
}

main section .animation {
    width: 50em;
    height: 30em;
    border: var(--secondary-color) 1px solid;
    background-color: var(--nav-color);
    border-radius: var(--corner-radius);
    display: flex;
    justify-content: center;
    align-items: center;
    isolation: isolate;
}

footer {
    border-width: 1px 0 0 0;
    border-style: solid;
    border-color: var(--secondary-color);
    list-style: none;
    background-color: var(--nav-color);
    color: var(--primary-color);
}
footer, footer div {
    display: flex;
    justify-content: space-around;
    gap: 2em;
}

footer li {
    margin: 1em 0;
}

@media screen and (max-width: 768px) {
    header>h1 {
        font-size: 1.2em;
        transform: translateY(80px);
    }

    header {
        min-height: 50dvh;
    }

    #header-animation {
        border-radius: 20px;
    }

    main section {
        flex-wrap: wrap;
        font-size: 0.7em;
    }

    main section .section-description {
        order: 10;
        text-align: center;
    }

    main section .section-description * {
        margin:  0 auto;
    }

    footer {
        flex-wrap: wrap;
        text-align: center;
    }
}