@import url('https://fonts.googleapis.com/css2?family=Gloria+Hallelujah&display=swap');

:root {
    font-family: "Gloria Hallelujah", sans-serif;
}

.canvas__wrapper {
    display: block;
    width: 100vw;
    height: 100vh;
    position: relative;
    overflow: hidden;
}

.loading-screen {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
    transition: opacity 0.6s ease;
}

.loading-screen.is-hidden { 
    opacity: 0; 
    pointer-events: none; 
}

.loading-screen__text { 
    font-size: 1.1rem; 
    color: white; 
}

.loading-screen__dot { 
    display: inline-block; 
    animation: blink 1.2s infinite; 
}

.loading-screen__dot:nth-child(2) {
    animation-delay: .2s;
}

.loading-screen__dot:nth-child(3) { 
    animation-delay: .4s; 
}

@keyframes blink { 0%, 80%, 100% { opacity: 0; } 40% { opacity: 1; } }

.intro {
    position: absolute;
    inset: 0;
    z-index: 3;
    padding: 2rem;
    background: radial-gradient(
        circle at center,
        rgba(0, 0, 0, 0.8) 0%,
        rgba(0, 0, 0, 0.6) 45%,
        rgba(0, 0, 0, 0) 100%
    );
}

.intro.is-hidden {
    display: none;
}

.intro:not(.is-hidden) ~ .cam-controls {
    display: none;
}

.intro:not(.is-hidden) ~ .quest {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.intro__panel {
    text-align: center;
    color: white;
    padding: 2rem;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

.intro__title {
    font-size: 1.5rem;
    text-align: center;
    max-width: 650px;
}

.intro__cta {
    font-size: 1.2rem;
    text-transform: uppercase;
    color: white;
    background: transparent;
    padding: 1rem 1.25rem;
    position: absolute;
    left: 50%;
    top: calc(50% + 12rem);
    transform: translateX(-50%);
}

.cam-controls {
    position: absolute;
    left: 50%;
    bottom: 3rem;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 12rem;
    z-index: 2;
}

.canvas__wrapper button {
    cursor: pointer;
    padding: 0;
    margin: 0;
    background: transparent;
    border-radius: 0;
}

.canvas__wrapper button img {
    display: block;
    width: 3.5rem;
    height: auto;
}

.canvas__wrapper button:focus-visible {
    outline: 2px solid white;
    outline-offset: 6px;
}

.canvas {
    width: 100% !important;
    position: absolute;
    top: 50%;
    left: 50%;
    translate: -50% -50%;
    z-index: 1;
}

.quest {
    position: absolute;
    top: 2rem;
    left: 3rem;
    right: auto;
    z-index: 4;
}

.quest__hitbox {
    position: relative;
    width: min(30rem, calc(100vw - 2.5rem));
    min-height: 5.5rem;
    pointer-events: none;
}

.quest__icon-wrap {
    position: absolute;
    top: 0;
    left: 0;
    right: auto;
    display: block;
    line-height: 0;
    transform-origin: center left;
    pointer-events: auto;
    transition: transform 0.45s cubic-bezier(0.33, 1, 0.68, 1);
}

.quest__icon {
    display: block;
    height: 6rem;
    width: auto;
}

.quest__panel {
    position: absolute;
    top: 0;
    left: 0;
    right: auto;
    max-width: calc(100vw - 6rem);
    padding: 0;
    box-sizing: border-box;
    color: #fff;
    background: none;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.45s ease;
}

.quest__heading {
    margin: 0 0 0.65rem;
    font-size: 1.35rem;
    font-weight: 400;
    line-height: 1.2;
    text-decoration: underline;
    text-underline-offset: 0.2em;
}

.quest__list {
    margin: 0;
    padding-left: 0.15rem;
    list-style: none;
    font-size: 1.05rem;
    line-height: 1.45;
}

.quest__list li {
    position: relative;
    padding-left: 0.85rem;
}

.quest__list li::before {
    content: "•";
    position: absolute;
    left: 0;
}

.quest__item--struck {
    text-decoration: line-through;
    text-decoration-thickness: 1px;
}

.quest__hitbox:hover .quest__icon-wrap {
    transform: translateX(calc(-100vw - 2rem));
}

.quest__hitbox:hover .quest__panel {
    opacity: 1;
    pointer-events: auto;
}

.drawing-overlay {
    position: fixed;
    inset: 0;
    z-index: 10;
    display: grid;
    place-items: center;
    padding: 1.5rem;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
}

.drawing-overlay.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.drawing-overlay__panel {
    width: min(1100px, 100%);
    max-height: min(85vh, 900px);
    padding: 1.25rem 1.25rem 1.5rem;
    position: relative;
}

.drawing-overlay__close {
    position: absolute;
    top: -1rem;
    right: -0.2rem;
    color: #fff;
    font-size: 2rem;
    line-height: 1;
    padding: 0.25rem 0.5rem;
}

.drawing-overlay__content {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
}

.drawing-overlay__img {
    width: 100%;
    height: auto;
    display: block;
    background: rgba(255, 255, 255, 0.05);
}

