/* Shared style for the 403 and 404 pages. All URLs are absolute: these pages are served for any path. */
@font-face { font-family: Normal; src: url('/assets/fonts/Normal.ttf'); }
@font-face { font-family: Bold; src: url('/assets/fonts/Bold.ttf'); }

:root {
    --bg: #F8ECEC;
    --bar: #FFFFFF;
    --text: #1b1340;
    --muted: #4a4370;
    --accent: #8000ff;
    --accent-soft: #e9d3ff;
}
@media (prefers-color-scheme: dark) {
    :root {
        --bg: #232323;
        --bar: #181818;
        --text: #FFFFFF;
        --muted: #c9bfe0;
        --accent: #d3a7ff;
        --accent-soft: #4d009a;
    }
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
    margin: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background-color: var(--bg);
    color: var(--text);
    font-family: 'Normal', sans-serif;
    user-select: none;
}

.errorBar {
    display: flex;
    align-items: center;
    gap: 1vw;
    height: 5vw;
    padding: 0 0.4vw;
    background-color: var(--bar);
    color: var(--text);
    text-decoration: none;
    font-family: 'Bold', sans-serif;
    font-size: 2vw;
    line-height: 0.85;
}
.errorBar img {
    height: 4.4vw;
    border-radius: 40%;
}

.errorMain {
    position: relative;
    z-index: 1;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0 6vw 18vh;
    text-align: center;
}
.errorCode {
    font-family: 'Bold', sans-serif;
    font-size: 16vw;
    line-height: 1;
    background: linear-gradient(135deg, #8000ff, #d36bff 55%, #EBA2EB);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.errorTitle {
    margin: 1vw 0 0.5vw;
    font-family: 'Bold', sans-serif;
    font-size: 3vw;
}
.errorText {
    margin: 0 0 2.5vw;
    color: var(--muted);
    font-size: 1.6vw;
}
.homeButton {
    display: inline-block;
    padding: 0.6vw 1.6vw;
    border-radius: 0.6vw;
    background-color: #EBA2EB;
    color: #832087;
    font-family: 'Bold', sans-serif;
    font-size: 2.2vw;
    text-decoration: none;
    transition: transform 0.25s, color 0.25s;
}
.homeButton:hover {
    transform: scale(1.08);
    color: #ad00b3;
}
.homeButton:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 4px;
}

/* Puter wandering along the bottom of the page. The track clips it, so walking
   off-screen never widens the page (Android Chrome would zoom out to fit). */
.puterTrack {
    position: fixed;
    z-index: 0;
    left: 0;
    right: 0;
    bottom: 2vh;
    overflow: hidden;
    pointer-events: none;
}
#puterLooking {
    display: block;
    width: min(10vw, 15vh);
    animation: wander 6s ease-in-out infinite;
}
@keyframes wander {
    from { transform: translateX(-16vw); }
    to   { transform: translateX(102vw); }
}
@media (prefers-reduced-motion: reduce) {
    #puterLooking {
        animation: none;
        margin-left: auto;
        margin-right: 4vw;
    }
}

@media (max-aspect-ratio: 3/4) {
    .errorBar {
        height: 15vw;
        gap: 2.5vw;
        font-size: 3vh;
    }
    .errorBar img {
        height: 13.5vw;
    }
    .errorCode {
        font-size: 38vw;
    }
    .errorTitle {
        margin: 3vw 0 2vw;
        font-size: 8vw;
    }
    .errorText {
        margin-bottom: 7vw;
        font-size: 4.6vw;
        line-height: 1.4;
    }
    .homeButton {
        padding: 2.5vw 7vw;
        border-radius: 3.5vw;
        font-size: 7vw;
    }
    #puterLooking {
        width: min(34vw, 15vh);
    }
    @keyframes wander {
        from { transform: translateX(-36vw); }
        to   { transform: translateX(102vw); }
    }
}
