@import url('https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,400..700;1,400..700&display=swap');

:root {
    --default-shift-color: #2196f3ff;
    --sidebar-text-inactive-color: #d7d7d7;
    --sidebar-text-color: #ffffff;
    --dark-gray: #374140;
    --light-gray: #677977;
    --dark-red: #ca2127;
    --light-red: #E01F27;
    --dark-orange: #F6851F;
    --light-orange: #F8961D;
    --dark-teal: #1E9680;
    --light-teal: #28A992;
    --dark-green: #2C9C48;
    --light-green: #4CB853;
    --dark-blue: #124D7D;
    --light-blue: #1C77C3;
    --body-bg: #F0F0F0;
    --scrolled-h: 50px;
    --scrolled-top: 1.5rem;
    --near-black: #000910;
    --body-bg: #001220;
    --icon-top: calc(calc(100vh - 182px - 91px - 91px) / 4);
}

.nav-link {
    color: white;
}

.nav-link.active {
    color: #d1d1d1;
}

#icon, #docs {
    transition: top 500ms ease, left 500ms ease, height 500ms ease, width 500ms ease, transform 500ms ease, opacity 500ms ease;
}

#chevron {
    opacity: 1;
    pointer-events: none;
    position: fixed;
    font-size: 65px;
    bottom: var(--icon-top);
    left: calc(50vw - 65px / 2);
    animation: bounce 1s ease infinite;
    transition: opacity 500ms ease;
}

.scrolled #chevron {
    opacity: 0;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0)
    }

    50% {
        transform: translateY(-10px)
    }
}

@keyframes bounce-right {
    0%, 50%, 100% {
        transform: translateX(0)
    }

    25%, 75% {
        transform: translateX(-10px)
    }
}

#nav-opener {
    display: none;
    cursor: pointer;
}

.scrolled #top-bar-helper {
    display: initial;
    animation: bounce-right 3s ease;
    transition: opacity 500ms ease;
    opacity: 1;
}

#top-bar:hover #top-bar-helper {
    opacity: 0 !important;
}

#nav-opener, #top-bar-helper {
    z-index: 9999;
    font-size: 50px;
    height: 91px;
    height: var(--scrolled-h);
    top: var(--scrolled-top);
    right: 2rem;
    position: fixed; 
}

#nav-opener::before, #top-bar-helper::before {
    position: absolute;
    top: 0;
    right: 0;
}

#icon {
    z-index: 9999;
    aspect-ratio: 65/91;
    height: 91px;
    top: var(--icon-top);
    left: calc(50vw - 65px / 2);
    position: fixed;
}

.scrolled #icon {
    height: var(--scrolled-h);
    top: var(--scrolled-top);
    left: 2rem;
    position: fixed;
}

#docs {
    aspect-ratio: 272 / 91;
    z-index: 9999;
    position: fixed;
    top: 50%;
    left: 50%;
    height: 182px;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.scrolled #docs
{
    top: var(--scrolled-top);
    left: calc(50% - var(--scrolled-h) / 91 * 65 * 2);
    transform: translate(0,0);
    height: var(--scrolled-h)
}

#content {
    margin-top: 100vh;
    min-height: 100vh;
    transition: margin-top 500ms ease;
    width: 100%;
    padding-bottom: calc(3 * var(--scrolled-top) + var(--scrolled-h));
    padding-inline: 2rem;
    color: white;
    display: grid;
}

.scrolled.fixed #content {
    padding-top: calc(3 * var(--scrolled-top) + var(--scrolled-h));
    padding-left: calc(300px + 2rem);
    margin-top: 0;
}

html, body {
    margin: 0;
    background: var(--body-bg);
    min-height: 110vh;
    overflow-y: scroll;
    color: white; 
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
    font-size: 1rem;
}

.scrolled.fixed body {
    min-height: none;
}

#trigger {
    position: absolute;
    top: 100vh;
    width: 100px;
    height: 2px;
}

a {
    color: white;
}

* {
    box-sizing: border-box;
}

#side-bar {
    z-index: 9990;
    position: fixed;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 2rem;
    top: calc(2 * var(--scrolled-top) + var(--scrolled-h));
    left: 0;
    bottom: 0;
    width: 300px;
    background: var(--body-bg);
    overflow: auto;
}

.display-btn {
    --bg: var(--near-black);
    display: inline-block;
    position: relative;
    margin: .5rem .5rem;
    isolation: isolate;
}

.display-btn::before {
    content: '';
    position: absolute;
    inset: -.25rem -.5rem;
    background: var(--bg);
    border-radius: .25rem;
    z-index: -1;
}

.display-btn.green {
    --bg: var(--light-green);
    color: white;
}

.display-btn.blue {
    --bg: var(--light-blue);
    color: white;
}

.display-btn.red {
    --bg: var(--dark-red);
    color: white;
}

.display-btn.teal {
    --bg: var(--light-teal);
    color: white;
}

.display-btn.keyboard {
    --bg: var(--dark-gray);
    color: white;
}

.display-btn.keyboard::before {
    border: 1px solid var(--light-gray);
}

.display-link {
    color: var(--light-blue);
    text-decoration: underline;
    cursor: not-allowed;
}

.display-link.teal {
    color: var(--dark-teal);
}

#side-bar::before {
    z-index: 9999;
    content: '';
    position: absolute;
    right: 0;
    top: var(--scrolled-top);
    bottom: var(--scrolled-top);
    width: 2px;
    background: linear-gradient(0deg, transparent 0%, var(--light-gray) 50%, transparent 100%)
}

#top-bar {
    z-index: 9990;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: calc(2 * var(--scrolled-top) + var(--scrolled-h));
    backdrop-filter: blur(60px) brightness(.5);
    background: transparent;
    --webkit-background: var(--body-bg);
}

h1, h2, h3, h4, h5, h6
{
    font-family: "Lora";
    font-weight: 900;
    margin-bottom: 0;
}

h1.main-title {
    font-size: 4rem;
    margin-bottom: .5rem;
    margin-top: 0;
}

span.descriptors {
    color: #d1d1d1;
    margin-bottom: 1.5rem;
}

.index-category {
    position: relative;
}

.index-category h2 {
    margin-top: 0;
}

.category {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
}

.category::before, .index-category::before {
    content: '';
    position: absolute;
    left: .25rem;
    top: 2rem;
    bottom: 0;
    width: 1px;
    background-color: var(--light-gray);
}

.category span {
    font-weight: 900;
    font-size: 1.2rem;
    margin-bottom: .5rem;
}

.category a {
    margin-left: 1.5rem;
    margin-block: .25rem;
    text-decoration: none;
    color: var(--light-gray);
    transition: color 250ms ease;
}

.category a.selected, .category a:hover {
    color: white;
}

.steps {
    display: flex;
    flex-direction: row;
    gap: 1rem;
    margin-top: 3rem;
    width: 100%;
    justify-content: center;
    align-items: center;
}

.next-step, .previous-step {
    position: relative;
    width: 300px;
    height: 150px;
    background: transparent;
    display: flex;
    justify-content: center;
    flex-direction: column;
    padding: 1rem;
}

.next-step img, .previous-step img {
    position: absolute;
    inset: 0;
}

.previous-step {
    align-items: flex-end;
}

.next-step .name, .previous-step .name {
    font-size: 1.2rem;
    font-family: "Lora";
    font-weight: 900;
}

*[data-apx-href] {
    cursor: pointer;
}

.d-none {
    display: none
}

#top-bar #back-graphic
{
    position: absolute;
    top: var(--scrolled-top);
    right: calc(-1rem - var(--scrolled-h) / 92 * 448);
    transition: opacity 500ms ease, right 500ms ease;
    opacity: 0;
    height: var(--scrolled-h);
}

.scroll-container {
    width: 100%;
    overflow: auto;
}

.index-category {
    display: flex;
    flex-direction: column;
}

.index-category a {
    margin-left: 1rem;
}

.index-category h2 {
    margin-bottom: .5rem;
}

#top-bar-helper {
    display: none;
}

.red {
    color: var(--light-red);
}

@media (min-width: 1001px) {
    
    .scrolled #top-bar:hover #back-graphic {
        right: calc(50% - var(--scrolled-h) / 92 * 448 / 2);
        opacity: 1;
    }

    .scrolled:has(#top-bar:hover) #docs
    {
        left: calc(3rem + var(--scrolled-h) /91 * 65)
    }

    #top-bar {
        cursor: pointer;
    }

}

@media (max-width: 1000px) {
    #side-bar {
        left: -300px;
    }

    .nav-open #side-bar {
        left: 0;
    }

    .scrolled.fixed #content {
        padding-left: 2rem;
    }

    #nav-opener {
        display: initial;
    }

    #top-bar-helper {
        display: none !important;
    }
}

@media (max-width: 800px) {
    .steps {
        flex-direction: column;
    }
}

@media (max-width: 600px) {
    #docs {
        height: 25vw;
    }
}

@media (max-width: 370px) {
    .scrolled #docs {
        opacity: 0;
    }
}