@font-face {
    font-family: 'Alagard';
    src: url('../public/alagard.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body, html {
    margin: 0;
    padding: 0;
    height: 100%;
    overflow-x: hidden;
    font-family: Arial, sans-serif;
    font-size: 16px;
}

#scene-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

#content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 2;
    padding: 1rem;
}

#logo {
    max-width: 90%;
    max-height: 20vh;
    object-fit: contain;
    margin-bottom: 1rem;
    font-family: 'Alagard', Arial, sans-serif;
}

#buttons {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

.nav-button {
    background: none;
    border: 2px solid #939597;
    color: #939597;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 84px;
    text-align: center;
}

.nav-button:hover {
    background-color: rgba(147, 149, 151, 0.2);
}

footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    color: #696969;
    text-align: center;
    padding: 0.5rem;
    font-size: 0.7rem;
    z-index: 2;
    font-family: 'Alagard', Arial, sans-serif;
}

.container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1rem;
}

.radio-wrapper {
    position: relative;
    display: flex;
    height: 38px;
    width: 84px;
    margin: 3px;
}

.radio-wrapper .input {
    position: absolute;
    height: 100%;
    width: 100%;
    margin: 0;
    cursor: pointer;
    z-index: 10;
    opacity: 0;
}

.btn {
    --primary: #808080;
    --shadow-primary: #A9A9A9;
    --color: #000000;
    --font-size: 9px;
    --shadow-primary-hue: 180;
    --shadow-secondary-hue: 60;
    --shadow-secondary: hsl(var(--shadow-secondary-hue), 90%, 60%);
    --clip: polygon(11% 0, 95% 0, 100% 25%, 90% 90%, 95% 90%, 85% 90%, 85% 100%, 7% 100%, 0 80%);
    --border: 5px;
    --shimmy-distance: 5;
    --clip-one: polygon(0 2%, 100% 2%, 100% 95%, 95% 95%, 95% 90%, 85% 90%, 85% 95%, 8% 95%, 0 70%);
    --clip-two: polygon(0 78%, 100% 78%, 100% 100%, 95% 100%, 95% 90%, 85% 90%, 85% 100%, 8% 100%, 0 78%);
    --clip-three: polygon(0 44%, 100% 44%, 100% 54%, 95% 54%, 95% 54%, 85% 54%, 85% 54%, 8% 54%, 0 54%);
    --clip-four: polygon(0 0, 100% 0, 100% 0, 95% 0, 95% 0, 85% 0, 85% 0, 8% 0, 0 0);
    --clip-five: polygon(0 0, 100% 0, 100% 0, 95% 0, 95% 0, 85% 0, 85% 0, 8% 0, 0 0);
    --clip-six: polygon(0 40%, 100% 40%, 100% 85%, 95% 85%, 95% 85%, 85% 85%, 85% 85%, 8% 85%, 0 70%);
    --clip-seven: polygon(0 63%, 100% 63%, 100% 80%, 95% 80%, 95% 80%, 85% 80%, 85% 80%, 8% 80%, 0 70%);
    color: var(--color);
    text-transform: uppercase;
    font-size: var(--font-size);
    letter-spacing: 3px;
    position: relative;
    font-weight: 900;
    width: 100%;
    height: 100%;
    line-height: 38px;
    text-align: center;
    transition: background 0.2s, 0.3s;
    font-family: 'Alagard', Arial, sans-serif;
}

.input:checked + .btn {
    --primary: #696969;
    --shadow-primary: #B8B8B8;
}

.input:hover + .btn {
    --primary: #A9A9A9;
}

.btn:after, .btn:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    clip-path: var(--clip);
    z-index: -1;
}

.btn:before {
    background: var(--shadow-primary);
    transform: translate(var(--border), 0);
}

.btn:after {
    background: var(--primary);
}

.btn__tag {
    position: absolute;
    padding: 1px 4px;
    letter-spacing: 1px;
    line-height: 1;
    bottom: -5%;
    right: 5%;
    font-weight: normal;
    color: hsl(0, 0%, 0%);
    font-size: var(--label-size);
}

.glitchy {
    position: absolute;
    top: calc(var(--border) * -1);
    left: calc(var(--border) * -1);
    right: calc(var(--border) * -1);
    bottom: calc(var(--border) * -1);
    background: var(--shadow-primary);
    text-shadow: 2px 2px var(--shadow-primary), -2px -2px var(--shadow-secondary);
    clip-path: var(--clip);
    animation: glitch 1s infinite;
    display: none;
}

.input:hover + .btn .glitchy {
    display: block;
}

.input:checked + .btn .glitchy {
    display: block;
    animation: glitch 5s infinite;
}

.glitchy:before {
    content: '';
    position: absolute;
    top: calc(var(--border) * 1);
    right: calc(var(--border) * 1);
    bottom: calc(var(--border) * 1);
    left: calc(var(--border) * 1);
    clip-path: var(--clip);
    background: var(--primary);
    z-index: -1;
}

@keyframes glitch {
    0% { clip-path: var(--clip-one); }
    2%, 8% { clip-path: var(--clip-two); transform: translate(calc(var(--shimmy-distance) * -1%), 0); }
    6% { clip-path: var(--clip-two); transform: translate(calc(var(--shimmy-distance) * 1%), 0); }
    9% { clip-path: var(--clip-two); transform: translate(0, 0); }
    10% { clip-path: var(--clip-three); transform: translate(calc(var(--shimmy-distance) * 1%), 0); }
    13% { clip-path: var(--clip-three); transform: translate(0, 0); }
    14%, 21% { clip-path: var(--clip-four); transform: translate(calc(var(--shimmy-distance) * 1%), 0); }
    25% { clip-path: var(--clip-five); transform: translate(calc(var(--shimmy-distance) * 1%), 0); }
    30% { clip-path: var(--clip-five); transform: translate(calc(var(--shimmy-distance) * -1%), 0); }
    35%, 45% { clip-path: var(--clip-six); transform: translate(calc(var(--shimmy-distance) * -1%)); }
    40% { clip-path: var(--clip-six); transform: translate(calc(var(--shimmy-distance) * 1%)); }
    50% { clip-path: var(--clip-six); transform: translate(0, 0); }
    55% { clip-path: var(--clip-seven); transform: translate(calc(var(--shimmy-distance) * 1%), 0); }
    60% { clip-path: var(--clip-seven); transform: translate(0, 0); }
    31%, 61%, 100% { clip-path: var(--clip-four); }
}

.number {
    background: var(--shadow-primary);
    color: #4D4D4D;
    font-size: 5.5px;
    font-weight: 700;
    letter-spacing: 1px;
    position: absolute;
    width: 15px;
    height: 6px;
    top: 0;
    left: 81%;
    line-height: 6.2px;
}

.marquee {
    width: 100%;
    overflow: hidden;
    text-align: center;
    color: #333;
    font-family: 'Alagard', Arial, sans-serif;
    padding: 0.5rem 0;
}

.marquee-content {
    display: inline-block;
    white-space: nowrap;
    animation: marquee 20s linear infinite;
}

.marquee-sub {
    color: #333;
    font-family: 'Alagard', Arial, sans-serif;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    outline: inherit;
    font-size: 0.9rem;
}

.marquee-sub:hover {
    text-decoration: underline;
}

.main-content {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    min-height: calc(100vh - 120px);
    padding: 1rem;
}

@keyframes marquee {
    0% { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
}

@media screen and (min-width: 768px) {
    body, html {
        font-size: 18px;
    }

    #logo {
        max-width: 50%;
        max-height: 30vh;
        margin-bottom: 2rem;
    }

    #buttons {
        flex-direction: row;
        gap: 1rem;
    }

    .container {
        flex-direction: row;
        gap: 3rem;
    }

    footer {
        font-size: 0.8rem;
    }

    .main-content {
        flex-direction: row;
        padding: 0 5%;
    }

    .marquee-sub {
        font-size: 1rem;
    }
}