@font-face{
    font-family:"Caviar";
    src:url("../fonts/Caviar.ttf") format("truetype");
    font-weight:400;
}

*{
    margin:0;
    padding:0;
    box-sizing:border-box;
}

html,
body{
    width:100%;
    height:100%;
    overflow:hidden;
}

body{
    background:#151515;
    color:#fff;
    font-family:"Caviar",sans-serif;
    -webkit-font-smoothing:antialiased;
    -moz-osx-font-smoothing:grayscale;
}

body::before{
    content:"";
    position:fixed;
    inset:0;
    background:url("404.gif") center center / cover no-repeat;
    opacity:.3;
    pointer-events:none;
    z-index:0;
}

body::after{
    content:"";
    position:fixed;
    inset:0;
    pointer-events:none;
    background:
        radial-gradient(circle at 18% 22%, rgba(255,255,255,.055) 0 .6px, transparent .8px),
        radial-gradient(circle at 62% 72%, rgba(255,255,255,.045) 0 .7px, transparent .9px),
        repeating-linear-gradient(90deg, rgba(255,255,255,.018) 0 1px, transparent 1px 4px),
        repeating-linear-gradient(0deg, rgba(0,0,0,.18) 0 1px, transparent 1px 3px);
    background-size:4px 4px, 5px 5px, auto, auto;
    mix-blend-mode:screen;
    opacity:.34;
    z-index:1;
}

.nav{
    position:fixed;
    top:28px;
    left:0;
    right:0;
    padding:0 48px;
    display:flex;
    justify-content:space-between;
    align-items:flex-start;
    z-index:1000;
}

.logo img{
    width:220px;
    display:block;
}

nav{
    display:flex;
    align-items:center;
    gap:70px;
    padding-bottom:18px;
    border-bottom:1px solid rgba(255,255,255,.25);
    min-width:730px;
}

nav a{
    color:rgba(255,255,255,.84);
    text-decoration:none;
    font-size:13px;
    font-weight:300;
    letter-spacing:.08em;
    text-transform:uppercase;
    display:flex;
    align-items:center;
    transition:opacity .25s ease, transform .25s ease;
}

nav a:hover{
    opacity:1;
    transform:translateY(-1px);
}

nav a.active{
    color:white;
    font-weight:700;
}

.nav-marker{
    width:12px;
    height:12px;
    margin-right:8px;
    display:block;
    flex-shrink:0;
    object-fit:contain;
}

.error-stage{
    position:relative;
    z-index:10;
    width:100vw;
    height:100vh;
    display:flex;
    align-items:center;
    justify-content:center;
    text-align:center;
}

.error-copy{
    transform:translateY(18px);
}

.error-code{
    display:flex;
    align-items:center;
    justify-content:center;
    gap:34px;
    font-size:170px;
    line-height:.82;
    font-weight:300;
    letter-spacing:.03em;
    color:rgba(255,255,255,.86);
    user-select:none;
}

.zero-game{
    position:relative;
    width:150px;
    height:150px;
    flex:0 0 150px;
}

.zero-slot,
.zero-piece{
    position:absolute;
    display:block;
    width:84px;
    height:84px;
    border:9px solid rgba(255,255,255,.82);
    background:transparent;
    opacity:.88;
}

.zero-slot{
    border-color:rgba(255,255,255,.12);
    pointer-events:none;
}

.slot-top,
.piece-top{
    left:33px;
    top:3px;
    border-bottom-color:transparent;
    border-left-color:transparent;
    border-radius:60px 60px 10px 10px;
    transform:rotate(45deg);
}

.slot-right,
.piece-right{
    right:3px;
    top:33px;
    border-left-color:transparent;
    border-bottom-color:transparent;
    border-radius:10px 60px 60px 10px;
    transform:rotate(45deg);
}

.slot-bottom,
.piece-bottom{
    left:33px;
    bottom:3px;
    border-top-color:transparent;
    border-right-color:transparent;
    border-radius:10px 10px 60px 60px;
    transform:rotate(45deg);
}

.slot-left,
.piece-left{
    left:3px;
    top:33px;
    border-top-color:transparent;
    border-right-color:transparent;
    border-radius:60px 10px 10px 60px;
    transform:rotate(45deg);
}

.zero-piece{
    z-index:4;
    cursor:grab;
    transition:left .35s cubic-bezier(.22,1,.36,1), top .35s cubic-bezier(.22,1,.36,1), right .35s cubic-bezier(.22,1,.36,1), bottom .35s cubic-bezier(.22,1,.36,1), opacity .25s ease, filter .25s ease;
}

.zero-piece:active{
    cursor:grabbing;
}

.zero-game[data-complete="false"] .piece-top{
    left:8px;
    top:-74px;
}

.zero-game[data-complete="false"] .piece-right{
    right:-74px;
    top:12px;
}

.zero-game[data-complete="false"] .piece-bottom{
    left:54px;
    bottom:-75px;
}

.zero-game[data-complete="false"] .piece-left{
    left:-78px;
    top:72px;
}

.zero-piece.is-placed{
    cursor:default;
    filter:drop-shadow(0 0 7px rgba(255,255,255,.22));
}

.zero-game[data-complete="true"] .zero-slot{
    opacity:0;
}

.zero-game[data-complete="true"] .zero-piece{
    opacity:1;
    filter:drop-shadow(0 0 10px rgba(255,255,255,.22));
}

.error-title{
    margin-top:48px;
    color:rgba(255,255,255,.84);
    font-size:33px;
    line-height:1;
    letter-spacing:.12em;
    text-transform:uppercase;
}

.error-text{
    margin-top:18px;
    color:rgba(255,255,255,.44);
    font-size:14px;
    line-height:1.7;
    letter-spacing:.1em;
    text-transform:lowercase;
}

.error-actions{
    margin-top:34px;
    display:flex;
    justify-content:center;
    gap:18px;
}

.error-actions a,
.reset-zero{
    min-width:145px;
    height:31px;
    padding:0 18px;
    border:0;
    border-radius:999px;
    background:rgba(255,255,255,.9);
    color:rgba(32,32,32,.66);
    font-family:"Caviar",sans-serif;
    font-size:14px;
    line-height:31px;
    letter-spacing:.04em;
    text-decoration:none;
    cursor:pointer;
    transition:background .18s ease, transform .18s ease;
}

.error-actions a:hover,
.reset-zero:hover{
    background:#fff;
    transform:translateY(-1px);
}

@media (max-width:900px){
    .nav{
        padding:0 20px;
    }

    .logo img{
        width:150px;
    }

    nav{
        gap:18px;
        min-width:auto;
    }

    nav a{
        font-size:10px;
    }

    .error-code{
        font-size:96px;
        gap:16px;
    }

    .zero-game{
        transform:scale(.72);
        margin:-20px;
    }
}

.zero-game .piece-top.is-placed{
    left:33px;
    top:3px;
    right:auto;
    bottom:auto;
}

.zero-game .piece-right.is-placed{
    right:3px;
    top:33px;
    left:auto;
    bottom:auto;
}

.zero-game .piece-bottom.is-placed{
    left:33px;
    bottom:3px;
    right:auto;
    top:auto;
}

.zero-game .piece-left.is-placed{
    left:3px;
    top:33px;
    right:auto;
    bottom:auto;
}

body::before{
    background:url("404.gif") center center / cover no-repeat !important;
    opacity:.3 !important;
}

.error-message{
    margin-top:38px;
    color:rgba(255,255,255,.58);
    font-size:15px;
    line-height:1.7;
    letter-spacing:.08em;
    text-transform:lowercase;
}

.error-message a{
    display:inline-block;
    color:rgba(255,255,255,.82);
    text-decoration:none;
    border-bottom:1px solid rgba(255,255,255,.32);
    transition:opacity .2s ease, transform .2s ease;
}

.error-message a:hover{
    opacity:1;
    transform:translateY(-1px);
}

.error-actions{
    display:none;
}
@media (max-width:768px){.nav{top:22px;left:0;right:0;padding:0;display:flex;flex-direction:column;align-items:center;justify-content:flex-start;gap:24px}.logo img{width:150px}nav{width:min(82vw,480px);min-width:0;max-width:none;gap:0;display:flex;justify-content:space-between;align-items:center;padding-bottom:12px;border-bottom:1px solid rgba(255,255,255,.32)}nav a{font-size:10px;letter-spacing:.055em;white-space:nowrap}.nav-marker,nav a.active img{width:8px;height:8px;margin-right:4px}}
@media (max-width:430px){.nav{top:20px;gap:22px}.logo img{width:138px}nav{width:86vw}nav a{font-size:9px;letter-spacing:.04em}}
