:root {
    --offset: 4%;
    --button-color: rgb(140, 140, 140);
}

* {
    box-sizing: border-box;
}

@font-face {
    font-family: 'Atlas Grotesk';
    src: url('typeface/AtlasGrotesk-Regular-Web.woff2') format('woff2'),
        url('typeface/AtlasGrotesk-Regular-Web.woff') format('woff');
    font-weight: 400;
    font-style: normal;
    font-stretch: normal;
}

body {
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 100vh;
    background: black;
    font-family: 'Atlas Grotesk', Helvetica, Arial, sans-serif;
    font-feature-settings: "liga", "kern";
    text-rendering: optimizelegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

textarea, select, input, button { outline: none; }

canvas {
    position: fixed;
    inset: 0;
    z-index: 1;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes moth-flap {
    0%, 100% { transform: scaleX(1) scaleY(1); }
    50% { transform: scaleX(0.8) scaleY(1.05); }
}

.logo-spiral {
    position: fixed;
    top: 17px;
    left: 17px;
    transform-origin: center;
    cursor: pointer;
    z-index: 2;
    mix-blend-mode: difference;
}

.logo-spiral:hover {
    animation: spin 1s linear infinite;
}

.logo-spiral path {
    stroke: white;
    stroke-width: 1;
    fill: none;
    vector-effect: non-scaling-stroke;
}

.logo-moth-link {
    position: fixed;
    top: 57px;
    left: 14px;
    z-index: 2;
    mix-blend-mode: difference;
    cursor: pointer;
    display: block;
    line-height: 0;
}

.logo-moth-link:hover .logo-moth {
    animation: moth-flap 0.4s ease-in-out infinite;
}

.logo-moth {
    display: block;
    transform-origin: center center;
    pointer-events: none;
}

.logo-moth path {
    stroke: white;
    fill: none;
    stroke-width: 1;
    stroke-linejoin: round;
    stroke-linecap: round;
    vector-effect: non-scaling-stroke;
}

.search-container {
    position: fixed;
    top: calc(50% - var(--offset));
    left: 50%;
    transform: translate(-50%, calc(-50% - var(--offset)));
    z-index: 2;
    display: flex;
    align-items: center;
    width: 270px;
    border: 1px solid white;
    border-radius: 4px;
    background: black;
}

.search-input {
    flex: 1;
    min-width: 0;
    padding: 14px 14px 15px 14px;
    font-size: 16px;
    line-height: 16px;
    background: none;
    color: white;
    border: none;
    text-align: left;
    border-radius: 4px;
    font-family: 'Atlas Grotesk', Helvetica, Arial, sans-serif;
}

.search-button {
    flex-shrink: 0;
    margin: 0 8px 0 0;
    padding: 11px;
    font-size: 10px;
    line-height: 10px;
    background: rgb(40, 40, 40);
    color: white;
    cursor: pointer;
    border: none;
    border-radius: 4px;
    font-family: 'Atlas Grotesk', Helvetica, Arial, sans-serif;
}

.search-button:hover {
    background: white;
    color: black;
}

.keep-going {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    padding:10px 12px;
    font-size: 16px;
    line-height:16px;
    width: 160px;
    background:white;
    color:black;
    border: 1px solid black;
    text-align: center;
    border-radius: 4px;
    font-family: 'Atlas Grotesk', Helvetica, Arial, sans-serif;
    z-index: 2;
    cursor: pointer;
    display: none;
}

.keep-going:hover {
    background:yellow;
    color:black;
    border: 1px solid black;
}

.no-links {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    padding:10px 12px;
    font-size: 16px;
    line-height:16px;
    width: 300px;
    background:red;
    color:white;
    border: 1px solid white;
    text-align: center;
    border-radius: 4px;
    font-family: 'Atlas Grotesk', Helvetica, Arial, sans-serif;
    z-index: 2;
    cursor: pointer;
    display: none;
}

.no-links:hover {
    background:yellow;
    color:black;
    border: 1px solid black;
}

.about-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    color: var(--button-color);
    border: 1px solid var(--button-color);
    border-radius: 4px;
    padding:10px 12px;
    font-size: 16px;
    line-height: 16px;
    cursor: pointer;
    mix-blend-mode: difference;
    z-index:2;
}

.about-button:hover {
    color:black;
    background:white;
    border: 1px solid white;
}

.about-dialog {
    position: fixed;
    top:50%;
    left:50%;
    transform: translate(-50%, -50%);
    border-radius:4px;
    border: 1px solid black;
    background:white;
    z-index:3;
    margin:0;
    padding:20px;
    width:100%;
    max-width:490px;
    font-size:16px;
    line-height:20px;
    display:none;
}

.about-dialog p {
    margin:0;
    padding:0;
}

.about-dialog a {
    color:black;
    text-decoration: none;
    border-bottom:1px dotted black;
}

.about-dialog a:hover {
    color:blue;
    border-bottom:1px solid blue;
}

.dialog-close {
    position:absolute;
    top:4px;
    right:4px;
    cursor: pointer;
    border-radius:4px;
    padding:0 5px 3px 5px;
    background: black;
    color:white;
}

.dialog-close:hover{
    background:black;
    color:white;
}