/* Copyright Mutart Creative 2024 
   Author: Yaman Mutart
*/
:root {
    --dark-bg: #121212;
    --card-bg: #1e1e1e;
    --text-light: #ffffff;
    --text-muted: #9ca3af;
    --primary-yellow: #FBBF24;
    --sign-green-light: #006400;
    --sign-green-dark: #004d00;
    --dark-red-start: #4d0000;
    --dark-red-end: #1a0000;
}

*, *::before, *::after {
    box-sizing: border-box;
}

html {
    height: 100%;
    width: 100%;
}

body {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    margin: 0;
    font-family: 'Inter', sans-serif;
    background-color: var(--dark-bg);
    background-image: radial-gradient(ellipse at center, rgba(110, 0, 0, 0.8) 0%, var(--dark-bg) 70%);
    color: var(--text-light);
    opacity: 0;
    animation: fadeInScreen 1.5s ease-in forwards;
    transition: background-image 1.5s ease-in-out;
    overflow: hidden;
}

body.scene-loaded {
    background: linear-gradient(135deg, #000000 10%, #1a1a3d 35%, #4d0000 65%, #000000 90%);
    background-size: 300% 300%;
    animation: fadeInScreen 1.5s ease-in forwards, smoothPsychedelic 25s ease-in-out infinite alternate;
}

@keyframes fadeInScreen {
    to { opacity: 1; }
}

@keyframes smoothPsychedelic {
    0% { background-position: 0% 0%; }
    100% { background-position: 100% 100%; }
}

#background-image-container {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    height: 100vh;
    width: auto;
    min-width: 1920px;
    z-index: 1;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
}

#background-image-container.visible {
    opacity: 1;
}

#background-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

#logo-container {
    position: fixed;
    z-index: 300;
    top: 50%;
    left: 50%;
    width: 300px;
    transform: translate(-50%, -50%);
    transition: top 1s ease-in-out, left 1s ease-in-out, width 1s ease-in-out, transform 1s ease-in-out;
    cursor: pointer;
}

@media (min-width: 768px) {
    #logo-container { width: 350px; }
}

#logo-container.nav-mode {
    top: 20px;
    left: 20px; 
    width: 150px;
    transform: translate(0, 0);
}

#logo-container img {
    max-width: 100%;
    display: block;
}

#main-layout {
    display: flex;
    height: 100vh;
    width: 100%;
    position: relative;
    z-index: 10;
}

.side-column { 
    display: none; 
    position: relative;
}

.center-column {
    flex-grow: 1;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

#main-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 200;
    background-color: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease-in-out;
}

#main-menu.active {
    opacity: 1;
    pointer-events: auto;
}

#main-menu ul { list-style: none; padding: 0; margin: 0; text-align: center; }
#main-menu li { margin: 20px 0; }
#main-menu a { color: var(--text-light); text-decoration: none; font-size: 2rem; font-weight: 900; text-transform: uppercase; letter-spacing: 2px; padding: 10px 20px; transition: color 0.3s ease; }
#main-menu a:hover { color: var(--primary-yellow); }

.signpost-container {
    position: relative;
    z-index: 3; 
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 30px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 1.5s ease-in-out;
}

body.scene-loaded .signpost-container {
    opacity: 1;
    visibility: visible;
}

.sign {
    background: radial-gradient(ellipse at bottom, var(--sign-green-light), var(--sign-green-dark));
    border-radius: 8px;
    padding: 15px 30px;
    margin-bottom: 20px;
    text-decoration: none;
    color: var(--text-light);
    font-weight: 900;
    font-size: 1.2rem;
    transition: transform 0.3s ease;
    white-space: nowrap;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.7);
    box-shadow: 0 0 0 4px #fff,
                0 0 0 8px var(--sign-green-dark),
                5px 5px 15px rgba(0,0,0,0.5);
}

.sign:hover {
    transform: scale(1.1) !important;
}

.sign:nth-child(1) { transform: rotate(-5deg); }
.sign:nth-child(2) { transform: rotate(3deg); margin-left: -40px; }
.sign:nth-child(3) { transform: rotate(6deg); margin-left: 50px; }
.sign:nth-child(4) { transform: rotate(-2deg); }

.social-icons-left, .social-icons-right {
    position: absolute;
    bottom: 20px;
    display: flex;
    gap: 20px;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 1.875s ease-in-out 0.75s;
}

body.scene-loaded .social-icons-left,
body.scene-loaded .social-icons-right {
    opacity: 1;
    visibility: visible;
}

.social-icons-left { left: 20px; }
.social-icons-right { right: 20px; }

.social-icons-left a, .social-icons-right a {
    color: var(--text-light);
    transition: transform 0.3s ease, color 0.3s ease;
}
.social-icons-left a:hover, .social-icons-right a:hover {
    transform: scale(1.15);
    color: var(--primary-yellow);
}
.social-icons-left svg, .social-icons-right svg {
    width: 28px;
    height: 28px;
    fill: currentColor;
}

#menu-hint {
    visibility: hidden;
    position: fixed;
    top: 135px;
    left: 95px;
    background: linear-gradient(to bottom, var(--dark-red-start), var(--dark-red-end));
    color: var(--text-light);
    padding: 10px 15px;
    border-radius: 6px;
    border: 1px solid black;
    font-weight: 700;
    text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000;
    z-index: 400;
    display: flex;
    align-items: center;
    gap: 15px;
    transform: translateX(-500px);
}

#hint-close {
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    text-shadow: none;
}

@media (orientation: landscape) {
    #menu-hint.slide-in {
        visibility: visible;
        animation: slideInGrind 1.5s cubic-bezier(0.1, 0.8, 0.2, 1) forwards;
    }

    #menu-hint.fall-off {
        animation: fallOff 1.2s ease-in forwards;
    }
}

@keyframes slideInGrind {
    0% { transform: translateX(-500px); }
    80% { transform: translateX(0); }
    85% { transform: translate(0, 5px) rotate(2deg); }
    90% { transform: translate(0, -5px) rotate(-2deg); }
    95% { transform: translate(0, 2px) rotate(1deg); }
    100% { transform: translateX(0); }
}

@keyframes fallOff {
    0% { transform: translateY(0) rotate(0); opacity: 1; }
    30% { transform: translateY(20px) rotate(-5deg); opacity: 1; }
    100% { transform: translateY(120vh) rotate(35deg); opacity: 0; }
}

@media (max-width: 1199px) {
    #background-image-container { bottom: -10%; }
}

@media (min-width: 1200px) {
    #background-image-container { bottom: -5%; }
    .side-column { 
        display: block; 
        flex-basis: 25%; 
        flex-shrink: 0; 
        background: transparent;
    }
    .center-column { flex-basis: 50%; flex-shrink: 0; }
    #main-menu.active { background-color: rgba(0, 0, 0, 0.7); }
    #main-menu ul { background-color: var(--card-bg); padding: 4rem 6rem; border-radius: 12px; border: 1px solid rgba(255, 255, 255, 0.1); box-shadow: 0 10px 30px rgba(0,0,0,0.5); }
}
