@font-face {
    font-family: "Montserrat";
    src: url("assets/Montserrat/Montserrat-VariableFont_wght.ttf")
        format("truetype");
    font-weight: 100 900;
    font-style: normal;
}

@font-face {
    font-family: "Montserrat";
    src: url("assets/Montserrat/Montserrat-Italic-VariableFont_wght.ttf")
        format("truetype");
    font-weight: 100 900;
    font-style: italic;
}

@font-face {
    font-family: "Gotham Bold";
    src: url("assets/Gotham-Bold.otf") format("opentype");
    font-weight: bold;
    font-style: normal;
}

:root {
    touch-action: pan-x pan-y;
    height: 100%;
}

:root {
    --color-bg-white: white;
    --color-bg-black: black;
    --color-fg-white: white;
    --color-fg-black: black;

    --overlay-top-space: 1.5rem;
    --overlay-top-lr-space: 1.5rem;
    --overlay-top-left-icon-height: 5rem;
    --overlay-top-right-icon-height: 3.5rem;

    --overlay-bottom-space: min(8vh, 3rem);
    --overlay-bottom-buttons-height: 2rem;
    --overlay-bottom-buttons-container-width: 75%;
    --overlay-bottom-buttons-border-width: 2px;
    --overlay-bottom-font-size: 1.15rem;
    --overlay-bottom-font-weight: 700;

    --tuto-header-font-size: 1.1rem;
    --tuto-header-font-weight: 750;
    --tuto-header-font-color: white;

    --tuto-footer-circle-width: 11px;
    --tuto-footer-circle-color: white;
    --tuto-footer-bottom-spacing: min(3vh, 1rem);

    --tuto-step-bg-color: white;
    --tuto-step-fg-color: black;
    --tuto-step-tb-spacing: 1.5rem;
    --tuto-step-lr-spacing: 1.25rem;
    --tuto-step-border-width: 2px;
    --tuto-step-border-radius: 14px;
    --tuto-step-border-offset: 8px;
    --tuto-step-font-size: 0.85rem;
    --tuto-step-font-weight: 450;
    --tuto-step-triangle-height: 14px;

    --flashscreen-title-fontsize: 1.1rem;
    --flashscreen-title-fontweight: 700;
    --flashcreen-desc-fontsize: 1.1rem;
    --flashscreen-desc-wontweight: 400;
}

/**/
:root {
    --bg-color-adaptive: white;
    --fg-color-adaptive: black;
}

html[data-color-mode="dark"] {
    --bg-color-adaptive: black;
    --fg-color-adaptive: white;
}

button {
    all: unset;
    display: flex;
    cursor: pointer;

    transition: opacity 0.25s ease;
}
button:active {
    opacity: 0.9;
}
a {
    all: unset;
    display: flex;
    cursor: pointer;

    transition: opacity 0.25s ease;
}
a:active {
    opacity: 0.9;
}

p,
h3 {
    all: unset;
}

* {
    font-family: "Montserrat", sans-serif;
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    display: block;
    height: 100dvh;
    width: 100dvw;
    position: relative;

    background-color: var(--bg-color-adaptive);
    color: var(--fg-color-adaptive);
}

/* START OVERLAY TOP */
#overlay-top {
    position: absolute;
    z-index: 2;
    top: 0px;
    left: 0px;
    width: 100%;
    display: flex;
    justify-content: center;

    padding-top: var(--overlay-top-space);
}

#overlay-top > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: fit-content;

    width: calc(100% - calc(2 * var(--overlay-top-lr-space)));
}

#overlay-top > div > .ar-toggle-btn {
    display: flex;
    height: var(--overlay-top-left-icon-height);
}

#overlay-top > div > .light-mode-toggle-btn {
    display: flex;

    height: var(--overlay-top-right-icon-height);
    width: calc(1.8 * var(--overlay-top-right-icon-height));
}

html[data-color-mode="dark"] #overlay-top .day-mode-icon {
    display: none;
}
html[data-color-mode="light"] #overlay-top .night-mode-icon {
    display: none;
}
html[data-color-mode="light"] #overlay-top #sunPNG {
    opacity: 1;
}
html[data-color-mode="dark"] #overlay-top #sunPNG {
    opacity: 0;
}

html[data-color-mode="dark"] #overlay-top #AR-icon {
    filter: invert();
}

/* END OVERLAY TOP */

/* START OVERLAY BOTTOM */
#overlay-bottom {
    position: absolute;
    z-index: 4;
    bottom: 0px;
    left: 0px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    padding-bottom: var(--overlay-bottom-space);
}

#overlay-bottom > .buttons {
    display: flex;
    height: var(--overlay-bottom-buttons-height);
    width: var(--overlay-bottom-buttons-container-width);
}
#overlay-bottom .buttons button {
    width: 50%;
    justify-content: center;
    align-items: center;
    height: 100%;

    border: var(--overlay-bottom-buttons-border-width) solid
        var(--fg-color-adaptive);
    font-weight: var(--overlay-bottom-font-weight);
    font-size: var(--overlay-bottom-font-size);
}

#overlay-bottom .buttons button:nth-child(2) {
    border-left: none;
}

html[data-is-in-splash="true"] #overlay-bottom div button {
    border: var(--overlay-bottom-buttons-border-width) solid
        var(--color-fg-white);
    color: var(--color-fg-white);
}
html[data-is-in-splash="true"] #overlay-bottom div button:nth-child(2) {
    border: var(--overlay-bottom-buttons-border-width) solid
        var(--color-fg-white);
    color: var(--color-fg-white);
    border-left: none;
}

#progeess-bar-outer {
    width: var(--overlay-bottom-buttons-container-width);
    height: 3px;
    z-index: 10;
}

#progeess-bar-inner {
    width: 3px;
    height: 100%;

    cursor: default;
    border: none !important;
    background-color: var(--color-fg-white);
    transition: width 0.25s ease !important;
}

/* END OVERLAY BOTTOM */

/* START OVERLAY TUTORIAL */
#overlay-tutorial {
    position: absolute;
    z-index: 5;

    height: 100%;
    width: 100%;

    display: flex;
    flex-direction: column;
    align-items: center;

    background-color: rgba(0, 0, 0, 0.5);
    padding-top: var(--overlay-top-space);
}

#overlay-tutorial-header {
    height: max(
        var(--overlay-top-left-icon-height),
        var(--overlay-top-right-icon-height)
    );

    display: flex;
    align-items: center;
    justify-content: center;

    button {
        color: var(--tuto-header-font-color);
        font-weight: var(--tuto-header-font-weight);
        font-size: var(--tuto-header-font-size);

        text-decoration: underline;
        text-decoration-thickness: 1px;
        text-underline-offset: 3px;
    }
}

#overlay-tutorial-footer {
    height: calc(
        var(--overlay-bottom-space) + var(--overlay-bottom-buttons-height)
    );
    display: flex;
    align-items: flex-end;
    justify-content: center;

    gap: 6px;
    padding-bottom: var(--tuto-footer-bottom-spacing);
}

#overlay-tutorial-footer span {
    height: var(--tuto-footer-circle-width);
    width: var(--tuto-footer-circle-width);
    border-radius: 50%;
    background-color: transparent;
    border: 2px solid var(--tuto-footer-circle-color);
}

#overlay-tutorial-content {
    flex: 1;
    display: flex;
    width: 100%;
}

#tuto-step-1 {
    align-self: flex-end;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: calc(
        var(--tuto-step-border-offset) + var(--tuto-step-triangle-height) + +4px
    );
}

#tuto-step-2 {
    align-self: flex-end;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 7.25rem;
    align-items: flex-start;
    gap: 1.5rem;
}

#tuto-step-3 {
    align-self: center;
    margin-left: auto;
    margin-right: auto;
    width: 50vh;
    height: 50vh;
}
#tuto-step-3 > .tuto-styled-container {
    margin-top: 55%;
    margin-left: calc(
        var(--tuto-step-border-offset) + var(--tuto-step-triangle-height)
    );
}

#tuto-step-4 {
    align-self: flex-start;
    margin-left: auto;
    margin-right: 3rem;
    margin-top: calc(
        var(--tuto-step-border-offset) + var(--tuto-step-triangle-height) -
            1rem + 4px
    );
}

#tuto-step-5 {
    align-self: flex-start;
    margin-left: 3.25rem;

    /* margin-top: 1rem; */
    margin-top: calc(
        var(--tuto-step-border-offset) + var(--tuto-step-triangle-height) - 4px
    );
}

html[data-tuto-step="1"] #tuto-round-1 {
    background-color: var(--tuto-footer-circle-color);
}
html[data-tuto-step="2"] #tuto-round-2 {
    background-color: var(--tuto-footer-circle-color);
}
html[data-tuto-step="3"] #tuto-round-3 {
    background-color: var(--tuto-footer-circle-color);
}
html[data-tuto-step="4"] #tuto-round-4 {
    background-color: var(--tuto-footer-circle-color);
}
html[data-tuto-step="5"] #tuto-round-5 {
    background-color: var(--tuto-footer-circle-color);
}

html:not([data-tuto-step="1"]) #tuto-step-1 {
    display: none;
}
html:not([data-tuto-step="2"]) #tuto-step-2 {
    display: none;
}
html:not([data-tuto-step="3"]) #tuto-step-3 {
    display: none;
}
html:not([data-tuto-step="4"]) #tuto-step-4 {
    display: none;
}
html:not([data-tuto-step="5"]) #tuto-step-5 {
    display: none;
}

/* END OVERLAY TUTORIAL */

/* START SPLASHSCREEN */
#overlay-splashscreen {
    position: absolute;
    top: 0;
    left: 0;

    height: 100%;
    width: 100%;

    background-color: #e8dcc9;
    background-image: url("assets/splash_back_vertical.jpg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;

    z-index: 3;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
}

@media (min-width: 768px) {
    #overlay-splashscreen {
        background-image: url("assets/splash_back_horizontal.jpg");
    }
}

#overlay-splashscreen-text-container {
    padding-block: 2rem;
    height: 50%;
    width: 88%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

@media (min-width: 768px) {
    #overlay-splashscreen-text-container {
        height: 35%;
    }
}

#overlay-splashscreen-text-container > h3 {
    margin-top: 2rem;
    color: var(--color-fg-white);
    font-size: var(--flashscreen-title-fontsize);
    font-weight: var(--flashscreen-title-fontweight);
}

#overlay-splashscreen-text-container > p {
    margin-top: 8px;
    color: var(--color-fg-white);
    font-style: italic;
    font-size: var(--flashcreen-desc-fontsize);
    font-weight: var(--flashscreen-desc-wontweight);
    padding-inline: 6px;

    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.25);
}

#overlay-splashscreen-text-container > img {
    max-width: 90%;
    max-height: 28%;
}
.mobile-logo {
    display: none;
}
.desktop-logo {
    display: block;
}
@media (max-width: 768px) {
    .mobile-logo {
        display: block;
    }

    .desktop-logo {
        display: none;
    }
}

#overlay-splashscreen > img {
    max-width: 95%;
    max-height: 40%;
    object-fit: contain;
}

/* END SPLASHSCREEN */

/* START UTILS*/
.hide-till-start {
    display: none !important;
}
html[data-is-in-splash="false"] .hide-till-start {
    display: flex !important;
}

.show-till-start {
    display: flex !important;
}
html[data-is-in-splash="false"] .show-till-start {
    display: none !important;
}

.show-till-start {
    display: flex !important;
}
html[data-is-in-splash="false"] .show-till-start {
    display: none !important;
}

.hide-till-loaded {
    display: none !important;
}
html[data-is-3d-loaded="true"] .hide-till-loaded {
    display: flex !important;
}

.show-till-loaded {
    display: flex !important;
}
html[data-is-3d-loaded="true"] .show-till-loaded {
    display: none !important;
}

.painting-style-border {
    box-shadow: /**/
        inset 0 0 0 3px #0a131f,
        /*----------*/ inset 0 0 0 5px #0c2237,
        /*----------*/ inset 0 0 0 7px #0a131f,
        /*----------*/ inset 0 0 0 10px #081f32,
        /*----------*/ inset 0 0 0 12px #0c1828,
        /*----------*/ inset 0 0 0 14px #081f32,
        /*----------*/ inset 0 0 0 16px #0c1828;
}
/* END UTILS*/

.tuto-styled-container-bg {
    content: "";
    position: absolute;
    height: 100%;
    width: 100%;
    z-index: -1;

    top: var(--tuto-step-border-offset);
    left: var(--tuto-step-border-offset);
    display: flex;

    div {
        border: var(--tuto-step-border-width) solid var(--tuto-step-bg-color);
    }
}

.tuto-styled-container-bg .d1 {
    border-radius: var(--tuto-step-border-radius) 0 0
        var(--tuto-step-border-radius);
    border-right: none;
    flex: 1;
}
.tuto-styled-container-bg .d3 {
    border-radius: 0 var(--tuto-step-border-radius)
        var(--tuto-step-border-radius) 0;
    border-left: none;
    /* flex: 1; */
    width: 1.5rem;
}
.tuto-styled-container-bg .d2 {
    border-left: none;
    border-right: none;
    border-top: none;
    position: relative;

    /* background-color: red; */
    width: 19px;
    border-bottom: none;
}

.tuto-styled-container-bg .d2:before {
    content: "";
    position: absolute;
    right: -2px;
    width: 24px; /* Width of triangle base */
    height: 24px; /* Height of triangle */
    background-size: contain;
    background-repeat: no-repeat;
    pointer-events: none;
}

.d2br::before {
    bottom: -22px;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'><polyline points='2,0 27,16 27,0' fill='none' stroke='white' stroke-width='2.5'/></svg>");
}
.d2bl::before {
    bottom: -22px;
    right: -4px !important;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'><polyline points='2,0 2,16 27,0' fill='none' stroke='white' stroke-width='2.5'/></svg>");
}
.d2mid {
    flex: 1;
    border-right: none !important;
    border-left: none !important;
}

.d2tr::before {
    top: -22px;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'><polyline points='2,30 27,16 27,30' fill='none' stroke='white' stroke-width='2.5'/></svg>");
}

.d2tl::before {
    top: -22px;
    right: -4px !important;

    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'><polyline points='2,30 2,16 27,30' fill='none' stroke='white' stroke-width='2.5'/></svg>");
}

.d1tl {
    flex: none !important;
    width: 1.5rem;
}
.d3tl {
    flex: 1;
}

.tuto-styled-container {
    width: fit-content;
    display: flex;
    flex-direction: column;
    align-items: center;

    padding-block: var(--tuto-step-tb-spacing);
    padding-inline: var(--tuto-step-lr-spacing);
    border-radius: var(--tuto-step-border-radius);
    background-color: var(--tuto-step-bg-color);
    color: var(--tuto-step-fg-color);
    font-size: var(--tuto-step-font-size);
    font-weight: var(--tuto-step-font-weight);

    position: relative;
}

.left {
    left: calc(-1 * var(--tuto-step-border-offset));
}
.right {
    /* left: calc(var(--tuto-step-border-offset) - var(--tuto-step-border-width)); */
    left: calc(var(--tuto-step-border-offset));
}
.top {
    top: calc(-1 * var(--tuto-step-border-offset));
}
.bottom {
    top: calc(var(--tuto-step-border-offset));
}
