:root {
    --bg-color: #000000;
    --text-color: #ffffff;
    --accent-color: #6a5acd;
    /* SlateBlue/Purple */
    --font-main: 'Montserrat', sans-serif;
    --font-body: 'Inter', sans-serif;
    --header-height: 100px;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-body);
    overflow: hidden;
    width: 100vw;
    height: 100vh;
}

#canvas-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

#ui-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    pointer-events: none;
    opacity: 0;
    /* Initially hidden for Big Bang sequence */
    transition: opacity 2s ease;
}

.main-nav {
    pointer-events: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    padding: 0 4rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 20;
    /* background: rgba(0,0,0,0.2); Optional: subtle tint if desired, but user just wanted no overlap */
    /* Removed mix-blend-mode to keep logo colors accurate */
}

.nav-logo-img {
    height: 60px;
    /* Reduced from 80px */
    width: auto;
    object-fit: contain;
    pointer-events: auto;
    cursor: pointer;
}

.logo-text {
    font-family: var(--font-main);
    font-weight: 700;
    font-size: 1.2rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.nav-menu {
    list-style: none;
    display: flex;
    gap: 3rem;
}

.nav-menu li {
    font-family: var(--font-main);
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    cursor: pointer;
    position: relative;
    opacity: 0.7;
    transition: opacity 0.3s;
    pointer-events: auto;
}

.nav-menu li:hover {
    opacity: 1;
}

.nav-menu li::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 1px;
    background: #fff;
    transition: width 0.3s ease;
}

.nav-menu li:hover::after {
    width: 100%;
}

.lang-btn {
    font-family: var(--font-main);
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    cursor: pointer;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.5);
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    transition: all 0.3s ease;
    pointer-events: auto;
    /* CRITICAL FIX */
    margin-left: 2rem;
}

.lang-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #fff;
}

#content-overlay {
    pointer-events: auto;
    position: absolute;
    top: var(--header-height);
    left: 0;
    width: 100%;
    height: calc(100% - var(--header-height));
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    /* Scrollbar styling */
    scrollbar-width: thin;
    scrollbar-color: #a0c4ff rgba(255, 255, 255, 0.05);
}

#content-overlay::-webkit-scrollbar {
    width: 8px;
}

#content-overlay::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

#content-overlay::-webkit-scrollbar-thumb {
    background-color: #a0c4ff;
    border-radius: 4px;
}

.section-content {
    pointer-events: auto;
    opacity: 0;
    transform: translateY(20px);
    transition: all 1s ease;
    width: 80%;
    max-width: 900px;
    /* Remove internal scrolling */
    max-height: none;
    overflow-y: visible;
    padding: 1rem;
    /* Center in flex container */
    margin: auto;
    /* Add spacing for nav - mostly reset now that container starts lower */
    padding-top: 2rem;
    padding-bottom: 50px;
}

.section-content.active {
    opacity: 1;
    transform: translateY(0);
}

h2 {
    font-family: var(--font-main);
    font-weight: 200;
    font-size: 3rem;
    margin-bottom: 1.5rem;
    letter-spacing: 0.1em;
}

p {
    font-weight: 300;
    line-height: 1.8;
    opacity: 0.8;
    margin-bottom: 1rem;
}

/* Mobile */
@media (max-width: 768px) {
    .main-nav {
        padding: 1.5rem;
        flex-direction: column;
        gap: 1rem;
        background: rgba(0, 0, 0, 0.8);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
    }

    .nav-menu {
        gap: 1.5rem;
    }

    h2 {
        font-size: 2rem;
    }
}

/* Contact Form Styles */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    width: 100%;
    max-width: 500px;
    margin: 2rem auto 0;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    color: #fff;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #a0c4ff;
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 15px rgba(160, 196, 255, 0.2);
}

.submit-btn {
    padding: 1rem 2rem;
    background: transparent;
    border: 1px solid #a0c4ff;
    color: #a0c4ff;
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all 0.3s ease;
    align-self: center;
}

.submit-btn:hover {
    background: #a0c4ff;
    transform: scale(1.05);
    box-shadow: 0 0 25px rgba(160, 196, 255, 0.4);
}

/* Service Card Background Images */
.service-bg-img {
    opacity: 0.3;
    /* Darker default state */
    transition: opacity 0.5s ease, transform 0.8s ease;
}

.service-hero-card:hover .service-bg-img {
    opacity: 0.8;
    /* Brighter on hover */
    transform: scale(1.1);
}

/* Partners Grid */
.partners-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.partner-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease, border-color 0.3s ease, background 0.3s ease;
    aspect-ratio: 3 / 2;
}

.partner-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.1);
}

.partner-logo-container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.partner-logo-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: grayscale(100%) opacity(0.8);
    transition: filter 0.3s ease, opacity 0.3s ease;
}

.partner-card:hover .partner-logo-container img {
    filter: grayscale(0%) opacity(1);
}

.partner-name-fallback {
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    letter-spacing: 0.05em;
}

/* Language Toggle */
.lang-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    padding: 0.3rem 0.8rem;
    font-family: var(--font-main);
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 20px;
}

.lang-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #fff;
}

@media (max-width: 768px) {
    .lang-switch {
        margin-left: 0 !important;
        margin-top: 1rem;
    }
}

/* Portfolio Modal */
.portfolio-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
    padding: 2rem;
}

.portfolio-modal.active {
    opacity: 1;
    pointer-events: auto;
}

.close-modal {
    position: absolute;
    top: 2rem;
    right: 2rem;
    background: none;
    border: none;
    color: #fff;
    font-size: 3rem;
    cursor: pointer;
    transition: transform 0.3s ease;
    z-index: 2001;
}

.close-modal:hover {
    transform: rotate(90deg);
    color: #a0c4ff;
}

.modal-content {
    width: 100%;
    max-width: 1200px;
    height: 90vh;
    overflow-y: auto;
    padding: 2rem;
}

.modal-content h2 {
    text-align: center;
    margin-bottom: 3rem;
    color: #a0c4ff;
    font-size: 2.5rem;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
}

.project-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border-color: #a0c4ff;
}

.project-media {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.project-info {
    padding: 1.5rem;
}

.project-info h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: #fff;
}

.project-info p {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
}

/* Scrollbar for modal */
.modal-content::-webkit-scrollbar {
    width: 8px;
}

.modal-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.modal-content::-webkit-scrollbar-thumb {
    background: #a0c4ff;
    border-radius: 4px;
}

/* Service Cards */
.service-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.service-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.1);
    border-color: #a0c4ff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.service-img {
    width: 100%;
    height: 160px;
    background-size: cover;
    background-position: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.service-info {
    padding: 1.5rem;
    flex-grow: 1;
}

.service-info h4 {
    color: #a0c4ff;
    margin-bottom: 0.8rem;
    font-size: 1.2rem;
    font-weight: 600;
}

.service-info p {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
    margin: 0;
}

/* Responsive Services Grid */
.services-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
}

/* Co-Creation Grid (Responsive) */
.co-creation-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    width: 100%;
    max-width: 1000px;
    /* Constrain width to prevent "too big" elements */
    margin: 0 auto 3rem auto;
    /* Center the grid */
}

@media (max-width: 960px) {
    .co-creation-grid {
        grid-template-columns: 1fr;
        /* Stack vertically on tablets/mobile */
        gap: 4rem;
        /* Increased spacing */
    }
}

@media (max-width: 768px) {
    .services-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        margin-bottom: 2rem;
    }

    .section-content {
        padding-top: 120px;
        /* Clear the mobile nav */
        height: 100%;
        /* Ensure full height availability */
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        /* Align to top instead of center */
    }

    /* Adjust image height for mobile cards if needed */
    .service-img {
        height: 200px;
        /* Slightly taller on mobile for better visibility */
    }
}

/* Company Info Table */
.company-info {
    width: 100%;
    margin-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    text-align: left;
    font-size: 0.9rem;
}

.company-info-row {
    display: flex;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding: 1rem 0;
}

.company-info-label {
    width: 120px;
    flex-shrink: 0;
    color: #a0c4ff;
    font-weight: 600;
}

.company-info-value {
    flex-grow: 1;
    color: rgba(255, 255, 255, 0.9);
}

@media (max-width: 768px) {
    .company-info-row {
        flex-direction: column;
        gap: 0.5rem;
    }

    .company-info-label {
        width: 100%;
        color: #a0c4ff;
    }
}

/* Services Section Redesign */
.services-split-container {
    display: flex;
    justify-content: center;
    align-items: stretch;
    /* Force equal height */
    gap: 2rem;
    width: 100%;
    max-width: 1200px;
    margin: 2rem auto;
    height: auto;
    /* Let content dictate height, but they will be equal */
    min-height: 450px;
    /* Minimum height for consistency */
}

.service-hero-card {
    /* flex: 1; */
    /* Removing flex:1 as we are in a grid now */
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    /* Fixed aspect ratio to prevent vertical stretching */
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 2rem;
    backdrop-filter: blur(5px);
}

.service-hero-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    z-index: 1;
    pointer-events: none;
}

.service-hero-card:hover {
    border-color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-5px);
}

.service-hero-card h3 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.5rem;
    z-index: 2;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.service-hero-card p {
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.8);
    z-index: 2;
    margin: 0;
}

/* Specific Card Styles */
.service-hero-card.ai {
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.1);
}

.service-hero-card.ai:hover {
    box-shadow: 0 0 50px rgba(0, 255, 255, 0.2);
}

.service-hero-card.xr {
    box-shadow: 0 0 30px rgba(255, 0, 255, 0.1);
}

.service-hero-card.xr:hover {
    box-shadow: 0 0 50px rgba(255, 0, 255, 0.2);
}

.service-hero-card.metaverse {
    box-shadow: 0 0 30px rgba(100, 255, 100, 0.1);
}

.service-hero-card.metaverse:hover {
    box-shadow: 0 0 50px rgba(100, 255, 100, 0.2);
}

/* Animations */
.service-hero-card .card-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 8rem;
    opacity: 0.1;
    transition: all 0.5s ease;
    z-index: 0;
}

.service-hero-card:hover .card-icon {
    opacity: 0.3;
    transform: translate(-50%, -50%) scale(1.1);
}

@media (max-width: 768px) {
    .services-split-container {
        flex-direction: column;
        height: auto;
        gap: 1.5rem;
    }

    .service-hero-card {
        width: 100%;
        height: auto;
        min-height: 280px;
    }

    .service-hero-card h3 {
        font-size: 1.5rem;
    }
}

/* Projects Grid in Modal */
#projects-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    /* PC: 2 columns strictly */
    gap: 2rem;
    width: 100%;
    margin-top: 2rem;
}

/* Mobile Responsive for Projects Grid */
@media (max-width: 768px) {
    #projects-grid {
        grid-template-columns: 1fr;
        /* Mobile: 1 column strictly */
        gap: 1.5rem;
    }
}

/* Projects Grid in Modal */
#projects-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    /* PC: 2 columns strictly */
    gap: 2rem;
    width: 100%;
    margin-top: 2rem;
}

/* Mobile Responsive for Projects Grid */
@media (max-width: 768px) {
    #projects-grid {
        grid-template-columns: 1fr;
        /* Mobile: 1 column strictly */
        gap: 1.5rem;
    }
}

/* Partners Section */
.partners-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    width: 100%;
    margin-top: 2rem;
    align-items: center;
}

.partner-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 120px;
    /* Unified height for cards */
}

.partner-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(255, 255, 255, 0.1);
}

.partner-logo-container {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.partner-logo-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: none;
    /* Keep original colors */
}

@media (max-width: 768px) {
    .partners-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .partner-card {
        height: 100px;
        padding: 1rem;
    }
}