/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body,
html {
    width: 100%;
    height: 100%;
    background-color: #000000;
    color: #ffffff;
    font-family: 'Outfit', sans-serif;
    overflow: hidden;
    /* Prevent scrolling during intro */
}

/* Star Background Canvas */
#star-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* Main Content */
#main-content {
    position: relative;
    z-index: 5;
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: all 1.5s ease-in-out;
}

/* Navigation & Buttons */
.main-nav {
    position: absolute;
    top: 40px;
    width: 100%;
    display: flex;
    justify-content: center;
    z-index: 30;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 40;
    position: fixed;
    top: 30px;
    right: 30px;
}

.menu-toggle span {
    width: 100%;
    height: 2px;
    background: #fff;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.nav-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 25px;
    text-align: center;
    align-items: center;

    /* Reveal Animation Properties */
    opacity: 0;
    transform: translateY(-30px);
    transition: opacity 1.5s ease-out, transform 1.5s ease-out;
}

#main-content.menu-active .nav-list {
    opacity: 1;
    transform: translateY(0);
}

@media (min-width: 768px) {

    /* Hide toggle on desktop */
    .menu-toggle {
        display: none;
    }

    .nav-list {
        flex-direction: row;
        gap: 40px;
    }
}

.nav-btn {
    text-decoration: none;
    color: #fff;
    font-size: 1.1rem;
    font-weight: 300;
    letter-spacing: 2px;
    text-transform: uppercase;
    padding: 12px 35px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50px;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    position: relative;
    display: inline-block;
    backdrop-filter: blur(5px);
    background: rgba(0, 0, 0, 0.5);
}

.nav-btn:hover {
    border-color: #ffffff;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
    transform: scale(1.05) translateY(-2px);
    box-shadow: 0 10px 30px rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.1);
}

/* View Management */
.content-view {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: opacity 0.8s ease-in-out, transform 0.8s ease-in-out;
    opacity: 0;
    pointer-events: none;
    z-index: 1;
}

.content-view.active {
    opacity: 1;
    pointer-events: auto;
    z-index: 10;
    transform: scale(1);
    overflow-y: auto;
    /* Enable scrolling for long content */
    justify-content: flex-start;
    /* Start from top */
    padding-top: 15vh;
    /* Initial spacing from top */
}

.content-view.hidden {
    transform: scale(0.95);
}

/* Services Section */
.services-container {
    width: 90%;
    max-width: 1200px;
    text-align: center;
    margin-top: 80px;
    /* Space for nav */
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 40px;
    letter-spacing: 3px;
    text-transform: uppercase;
    background: linear-gradient(45deg, #fff, #aaa);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.references-grid {
    display: flex;
    flex-direction: column;
    gap: 15px;
    /* Spacing between names */
    align-items: center;
}

.service-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 30px;
    border-radius: 20px;
    transition: all 0.3s ease;
    text-align: left;
    position: relative;
    overflow: hidden;
}

.service-card:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.service-card h3 {
    font-size: 1.5rem;
    font-weight: 400;
    margin-bottom: 10px;
    color: #fff;
}

.service-card p {
    font-size: 0.9rem;
    color: #ccc;
    font-weight: 200;
    line-height: 1.6;
}

.reference-card {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    min-height: 80px;
    background: transparent;
    border: none;
    box-shadow: none;
    backdrop-filter: none;
    padding: 10px;
}

.reference-card:hover {
    background: transparent;
    border: none;
    box-shadow: none;
    transform: scale(1.05);
    /* Slight grow instead of lift */
}

.reference-card h3 {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 300;
    letter-spacing: 1px;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.reference-card:hover h3 {
    opacity: 1;
    color: #fff;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

/* Header Logo adjustments for view */
.page-header {
    position: relative;
    display: flex;
    flex-direction: column;
    /* Stack logo and slogan */
    align-items: center;
    justify-content: center;
    z-index: 20;
    margin-bottom: 0;
}



.header-logo {
    width: 400px;
    max-width: 90vw;
    height: auto;
    filter: none;
    opacity: 1;
    animation: breathe 3s infinite ease-in-out;
}

@keyframes breathe {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.9;
    }

    50% {
        transform: scale(1.05);
        opacity: 1;
    }
}

/* Top Left Logo */
.top-logo {
    position: fixed;
    top: 20px;
    left: 40px;
    z-index: 100;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.5s ease, transform 0.3s ease;
    cursor: pointer;
    display: flex;
    align-items: center;
    height: 90px;
}

.top-logo img {
    height: 100%;
    /* Fill the container height */
    width: auto;
    filter: brightness(200%);
}

.top-logo.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-20px);
}


/* Contact Section */
.contact-wrapper {
    max-width: 600px;
    margin: 0 auto;
    width: 100%;
}

.contact-hero {
    min-height: 80vh;
    /* Takes up most of the view */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.contact-info {
    text-align: center;
    margin-top: 20px;
}

.contact-phone {
    font-size: 1.2rem;
    font-weight: 300;
    margin-bottom: 5px;
    /* Reduced to group with email */
    letter-spacing: 1px;
}

.contact-email {
    font-size: 1.1rem;
    font-weight: 300;
    color: #ddd;
    margin-bottom: 15px;
    /* Spacing before locations */
    letter-spacing: 1px;
}

.contact-location {
    font-size: 0.9rem;
    color: #ccc;
    font-weight: 200;
    margin-bottom: 5px;
    letter-spacing: 1px;
    /* Removed text-transform to keep original casing */
}

.contact-form {
    margin-top: 20px;
    margin-bottom: 100px;
    /* Space at bottom */
    display: flex;
    flex-direction: column;
    gap: 20px;
    background: rgba(255, 255, 255, 0.03);
    padding: 40px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.form-group input,
.form-group textarea {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    padding: 10px 0;
    color: #fff;
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    font-weight: 300;
    outline: none;
    transition: border-color 0.3s ease;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.form-group input:focus,
.form-group textarea:focus {
    border-bottom-color: #ffffff;
}

.submit-btn {
    margin-top: 10px;
    padding: 15px 40px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50px;
    color: #fff;
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all 0.3s ease;
    align-self: center;
    text-transform: uppercase;
}

.submit-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
}

/* Mobile Responsiveness */
@media (max-width: 768px) {

    /* Navigation */
    .main-nav {
        top: 0;
        /* Reset top to avoid conflict */
    }

    .menu-toggle {
        display: flex;
        /* Show toggle */
    }

    .nav-list {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: rgba(0, 0, 0, 0.95);
        backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: center;
        gap: 30px;
        padding: 0;

        /* Hidden State */
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transform: translateY(-20px);
        transition: all 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
    }

    /* Open State */
    .main-nav.nav-open .nav-list {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translateY(0);
    }

    .nav-btn {
        font-size: 1.5rem;
        /* Larger text for mobile menu */
        padding: 15px 30px;
        width: auto;
        max-width: none;
        background: transparent;
        border: none;
    }

    /* Hamburger Animation */
    .main-nav.nav-open .menu-toggle span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 6px);
    }

    .main-nav.nav-open .menu-toggle span:nth-child(2) {
        opacity: 0;
    }

    .main-nav.nav-open .menu-toggle span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -6px);
    }

    /* Top Logo */
    .top-logo {
        top: 20px;
        left: 20px;
        height: 50px;
        /* Smaller logo for mobile */
    }

    /* Center logo on homepage */
    .header-logo {
        width: 280px;
    }

    /* Titles */
    .section-title {
        font-size: 2rem;
        margin-bottom: 30px;
    }

    /* Services & References */
    .services-container {
        margin-top: 100px;
        /* More space for fixed elements */
        width: 95%;
    }

    .services-grid {
        grid-template-columns: 1fr;
        /* Single column */
        gap: 20px;
    }

    /* Contact Section */
    .contact-hero {
        min-height: 60vh;
        /* Shorter hero on mobile */
    }

    .contact-form {
        padding: 20px;
        width: 100%;
        border-radius: 15px;
    }

    .contact-wrapper {
        padding: 0 20px;
    }

    .content-view.active {
        padding-top: 120px;
        /* Adjust content top padding */
    }
}