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

html, body {
    height: 100%;
    width: 100%;
    margin: 0;
    padding: 0;
}

html {
    background-color: #353029;
    height: 100%;
    height: -webkit-fill-available;
    width: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

body {
    background-color: #353029;
    background-image: url('assets/background-image.webp');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    min-height: 100vh;
    min-height: -webkit-fill-available;
    height: 100vh;
    height: -webkit-fill-available;
    width: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

.logo {
    position: absolute;
    top: 0;
    left: 0;
    padding: 20px;
    display: flex;
    align-items: center;
    height: 60px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 200;
    font-size: 30px;
    color: #ffffff;
    letter-spacing: 0.1em;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    outline: none;
}

.menu-button {
    position: absolute;
    top: 0;
    right: 0;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 6px;
    height: 60px;
    cursor: pointer;
    z-index: 100;
    transition: transform 0.3s ease;
}

.menu-button span {
    width: 24px;
    height: 1px;
    background-color: #ffffff;
    display: block;
    transition: all 0.3s ease;
    opacity: 0.9;
}

.menu-button:hover span {
    opacity: 1;
}

.menu-button.active span {
    background-color: #ffffff;
}

.menu-button.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.menu-button.active span:nth-child(2) {
    transform: rotate(-45deg) translate(6px, -6px);
}

.menu-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #353029;
    z-index: 99;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.menu-popup.active {
    opacity: 1;
    visibility: visible;
}

.menu-popup-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 30px;
}

.menu-popup-item {
    font-family: 'Montserrat', sans-serif;
    font-weight: 200;
    font-size: 24px;
    color: rgba(255, 255, 255, 0.9);
    letter-spacing: 0.05em;
    text-decoration: none;
    opacity: 0.8;
    transition: opacity 0.3s ease, transform 0.3s ease;
    transform: translateY(20px);
}

.menu-popup.active .menu-popup-item {
    transform: translateY(0);
}

.menu-popup-item:nth-child(1) { transition-delay: 0.05s; }
.menu-popup-item:nth-child(2) { transition-delay: 0.1s; }
.menu-popup-item:nth-child(3) { transition-delay: 0.15s; }
.menu-popup-item:nth-child(4) { transition-delay: 0.2s; }
.menu-popup-item:nth-child(5) { transition-delay: 0.25s; }

.menu-popup-item:hover {
    opacity: 1;
}

@media (max-width: 768px) {
    .menu-popup-item {
        font-size: 20px;
        gap: 25px;
    }
}

.button-titles {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    grid-template-rows: repeat(2, min-content);
    justify-items: center;
    align-items: center;
    align-content: center;
    row-gap: 0px !important;
    column-gap: clamp(20px, 4vw, 60px);
    padding: 0 clamp(10px, 2vw, 20px);
    transform: translate(0, -100px);
    pointer-events: none;
}

.title-item {
    position: static;
    font-family: 'Montserrat', sans-serif;
    font-weight: 200;
    font-size: 18px;
    color: rgba(255, 255, 255, 0.9);
    letter-spacing: 0.05em;
    opacity: 0.8;
    transition: opacity 0.3s ease;
    pointer-events: auto;
    text-decoration: none;
    display: block;
}

.title-item:hover {
    opacity: 1;
}

.title-item:nth-child(1) { grid-row: 1; grid-column: 1; }
.title-item:nth-child(2) { grid-row: 1; grid-column: 3; }
.title-item:nth-child(3) { grid-row: 1; grid-column: 5; }
.title-item:nth-child(4) { grid-row: 2; grid-column: 2; }
.title-item:nth-child(5) { grid-row: 2; grid-column: 4; }
.title-item:nth-child(6) { grid-row: 3; grid-column: 3; }

/* Responsive adjustments */
@media (max-width: 768px) {
    html {
        height: 100%;
        height: -webkit-fill-available;
        position: fixed;
        width: 100%;
        overflow: hidden;
    }
    
    body {
        height: 100vh;
        height: -webkit-fill-available;
        background-image: url('/assets/phonebackground-image.webp');
        background-size: cover;
        background-position: center center;
        background-repeat: no-repeat;
        background-attachment: scroll;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
    }
    
    .button-titles {
        column-gap: clamp(10px, 3vw, 40px);
        padding: 0 clamp(5px, 1.5vw, 15px);
        transform: translate(0, 0);
    }
    
    .title-item {
        font-size: clamp(14px, 2.5vw, 18px);
        font-weight: 300;
    }
}

/* Safari iOS specific fix */
@supports (-webkit-touch-callout: none) {
    html {
        height: -webkit-fill-available;
    }
    
    body {
        min-height: -webkit-fill-available;
        height: -webkit-fill-available;
    }
}

@media (max-width: 480px) {
    .button-titles {
        column-gap: clamp(5px, 2vw, 20px);
        padding: 0 clamp(5px, 1vw, 10px);
    }
    
    .title-item {
        font-size: clamp(12px, 2vw, 16px);
        font-weight: 300;
    }
}
