@font-face {
    font-family: 'GoodbyeDespair';
    src: url('https://clatterbind.neocities.org/assets/fonts/goodbyeDespair.ttf') format('truetype');
}

body {
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    background-image: url('https://clatterbind.neocities.org/assets/img/hub/sky-bg.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
    height: 100vh;
    margin: 0;
    opacity: 1;
        overflow-y: hidden;
    overflow-x: hidden;
}

body>* {
    opacity: 0; 
    animation: fadeIn 1s forwards;
    transition: opacity 1s ease-in-out;
}

body > div:first-of-type {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('https://clatterbind.neocities.org/assets/img/hub/overlay.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    pointer-events: none;
    z-index: 500;
}

:root {
    --zoom-scale: 1;
}

@keyframes fadeIn {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

audio { display: none; }

@keyframes fadeInContainer {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

@keyframes shake {
    0% { transform: translate(1px, 1px) rotate(0deg); }
    10% { transform: translate(-1px, -2px) rotate(-1deg); }
    20% { transform: translate(-3px, 0px) rotate(1deg); }
    30% { transform: translate(3px, 2px) rotate(0deg); }
    40% { transform: translate(1px, -1px) rotate(1deg); }
    50% { transform: translate(-1px, 2px) rotate(-1deg); }
    60% { transform: translate(-3px, 1px) rotate(0deg); }
    70% { transform: translate(3px, 1px) rotate(-1deg); }
    80% { transform: translate(-1px, -1px) rotate(1deg); }
    90% { transform: translate(1px, 2px) rotate(0deg); }
    95% { transform: translate(1px, -2px) rotate(-1deg); }
    100% { transform: translate(1px, 1px) rotate(0deg); }
}

.video-container {
    position: fixed; 
    top: 640px;      
    left: 130px;     
    width: 210px;    
    height: 175px;  
    z-index: 550; 
}

.video-container iframe {
    width: 100%;
    height: 100%;
    opacity: 0; 
    z-index: 550;
}

body > nav {
    position: relative;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

body > nav > .container {
    width: 70vw;    
    height: auto;
    max-height: calc(100vh - 110px - 110px);
    aspect-ratio: 1100 / 800;
    background-color: rgba(10, 0, 33, 1);
    border-bottom: 20px solid #a064ff;
    border-right: 20px solid #a064ff;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.7);
    position: relative;
    margin: 220px auto 110px auto;
    opacity: 0;
    animation: fadeInContainer 1s forwards;
}

@media (max-width: 1600px) {
    body > nav > .container {
        width: 70vw;
        max-width: 1100px;
    }
}

.title {
    border-bottom: 10px solid #a064ff;
    height: 83px;
    width: 100%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-family: 'GoodbyeDespair', sans-serif;
    margin: 0;
    padding: 0;
    font-size: clamp(24px, 5vw, 20px);
    user-select: none;
}

.box {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-start;
    height: 85%;
}

.box > div {
    background-color: #1e1730;
    width: 35%;
    height: 25%;
    aspect-ratio: 450 / 165;
    border-bottom: 10px solid #a064ff;
    border-right: 10px solid #a064ff;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Positionnement horizontal des box */
.box1 { margin-left: 40px; margin-top: 30px; }
.box2 { align-self: center; }
.box3 { align-self: flex-end; margin-bottom: 30px; margin-right: 60px; }

#titlemain {
    font-family: 'GoodbyeDespair', sans-serif;
    margin: 0;
    padding: 0;
    color: #fff;
    font-size: clamp(14px, 4vw, 50px);
    font-weight: normal;
    text-align: center;
}

.box > div > h1,
h1 {
    font-family: 'GoodbyeDespair', sans-serif;
    margin: 0;
    padding: 0;
    color: #fff;
    font-weight: normal;
}

/* === MAIN CHARACTER SECTION === */

.maincharacterbox {
    width: 100%;
    height: 100%;
}

.maincharacterbox > .space-between {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
    margin: 40px 0 20px 90px;
    width: 85%;
}

.maincharacterbox > .space-around {
    display: flex;
    flex-direction: row;
    justify-content: space-around;
    align-items: flex-start;
    margin: 0 0 0 40px;
    width: 85%;
}

/* Chaque "character" contient la box + le nom en dessous */
.maincharacterbox .character {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 16.5%;
}

.maincharacterbox .character > div {
    background-color: #1e1730;
    width: 100%;
    aspect-ratio: 160 / 210;
    border-bottom: 10px solid #a064ff;
    border-right: 10px solid #a064ff;
    display: flex;
    justify-content: center;
    align-items: center;
}

.maincharacterbox .character img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.maincharacterbox .character h1 {
    margin-top: 10px;
    font-size: clamp(14px, 3vw, 24px);
    text-align: center;
}

/* === NPC === */

.decayedrobot {
    position: absolute; 
    bottom: 0;
    left: 0;
    height: 50%;  
    background-size: contain;
    background-repeat: no-repeat;
    background-position: bottom left; 
    z-index: 600;
}

#main {
    pointer-events: auto;
    z-index: 1000;
}
