:root {
    --bg-color: #050510;
    --text-color: #e0e6ed;
    --accent-primary: #00f0ff;
    --accent-secondary: #7000ff;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --font-heading: 'Space Grotesk', sans-serif;
    --font-body: 'Outfit', sans-serif;
}

* {
    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;
    /* 3D scene handles scroll usually, or we use a virtual scroll container */
    width: 100vw;
    height: 100vh;
}

canvas#app {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    outline: none;
}

nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 2rem 4rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 10;
    pointer-events: none;
    /* Let clicks pass through to 3D */
}

.logo {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: 2px;
    pointer-events: auto;
    text-shadow: 0 0 10px rgba(0, 240, 255, 0.5);
}

.menu-btn {
    pointer-events: auto;
    cursor: pointer;
    font-weight: 600;
    letter-spacing: 1px;
}

/* Loader */
#loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease;
}

.loader-content {
    width: 300px;
    text-align: center;
}

.loader-text {
    font-family: var(--font-heading);
    margin-bottom: 1rem;
    letter-spacing: 3px;
    color: var(--accent-primary);
}

.loader-bar {
    width: 100%;
    height: 2px;
    background: rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.loader-progress {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0%;
    background: var(--accent-primary);
    box-shadow: 0 0 10px var(--accent-primary);
    transition: width 0.2s;
}

/* Hero Section */
#hero {
    position: absolute;
    top: 50%;
    left: 10%;
    /* Text beside planet */
    transform: translateY(-50%);
    z-index: 5;
    pointer-events: none;
    max-width: 1000px;
}

.hero-text h1 {
    font-family: var(--font-heading);
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 1rem;
    text-transform: uppercase;
    transform: perspective(1000px) rotateY(10deg);
    /* 3D text feel */
}

.hero-text .thin {
    font-weight: 300;
    color: rgba(224, 230, 237, 0.6);
}

.tagline {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: rgba(224, 230, 237, 0.8);
    max-width: 400px;
}

.cta-container {
    display: flex;
    gap: 1.5rem;
    pointer-events: auto;
}

button {
    background: transparent;
    border: 1px solid var(--glass-border);
    color: var(--text-color);
    padding: 1rem 2rem;
    font-family: var(--font-heading);
    text-transform: uppercase;
    cursor: pointer;
    backdrop-filter: blur(10px);
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.cta-primary {
    background: rgba(0, 240, 255, 0.1);
    border-color: var(--accent-primary);
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.2);
}

.cta-primary:hover {
    background: var(--accent-primary);
    color: #000;
    box-shadow: 0 0 40px rgba(0, 240, 255, 0.6);
}

.cta-secondary:hover {
    border-color: var(--text-color);
    background: rgba(255, 255, 255, 0.1);
}

/* Stats Panel */
.stats-panel {
    position: absolute;
    bottom: 10%;
    right: 5%;
    display: flex;
    gap: 2rem;
    pointer-events: none;
    opacity: 0;
    animation: fadeInUp 1s ease forwards 2s;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.stat-item {
    background: rgba(5, 5, 16, 0.7);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-left: 3px solid var(--accent-primary);
    padding: 1.5rem 2rem;
    border-radius: 8px;
    min-width: 150px;
    transition: all 0.3s;
    pointer-events: auto;
}

.stat-item:hover {
    transform: translateY(-5px);
    border-left-color: var(--accent-secondary);
    box-shadow: 0 10px 30px rgba(0, 240, 255, 0.2);
}

.stat-number {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--accent-primary);
    margin-bottom: 0.5rem;
    text-shadow: 0 0 20px rgba(0, 240, 255, 0.5);
}

.stat-label {
    font-size: 0.9rem;
    color: rgba(224, 230, 237, 0.7);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Service Labels (Floating) */
.service-label {
    position: absolute;
    background: rgba(5, 5, 16, 0.95);
    backdrop-filter: blur(20px);
    padding: 1rem 2rem;
    border-radius: 8px;
    border: 2px solid var(--accent-primary);
    font-size: 1.2rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
    z-index: 50;
    /* Above canvas (z-index: 0) and other UI */
    cursor: pointer;
    transform: translate(-50%, -100%);
    white-space: nowrap;
}

.service-label:hover {
    transform: translate(-50%, -100%) scale(1.05);
}

/* Scroll Indicator */
.scroll-indicator {
    position: fixed;
    bottom: 5%;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    z-index: 5;
    opacity: 0;
    animation: fadeInUp 1s ease forwards 3s;
    pointer-events: none;
}

.scroll-text {
    font-size: 0.9rem;
    color: rgba(224, 230, 237, 0.6);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 0.5rem;
}

.scroll-arrow {
    font-size: 2rem;
    color: var(--accent-primary);
    animation: bounce 2s infinite;
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-10px);
    }

    60% {
        transform: translateY(-5px);
    }
}

/* Contact Overlay */
#contact-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 20;
    display: flex;
    justify-content: flex-end;
    /* Form on right, bots on left in 3D */
    align-items: center;
    padding-right: 10%;
    pointer-events: none;
    /* Allow pass through to bots unless hitting form */
}

#contact-overlay.hidden {
    display: none;
}

.contact-container {
    pointer-events: auto;
    background: rgba(5, 5, 16, 0.8);
    backdrop-filter: blur(20px);
    padding: 3rem;
    border: 1px solid var(--glass-border);
    border-left: 2px solid var(--accent-secondary);
    width: 400px;
    transform: translateX(100px);
    opacity: 0;
    transition: all 0.5s ease;
}

/* Show state for contact */
body.contact-mode .contact-container {
    transform: translateX(0);
    opacity: 1;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--accent-primary);
}

input,
textarea {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    padding: 0.8rem;
    color: white;
    font-family: var(--font-body);
}

input:focus,
textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.2);
}

textarea {
    height: 100px;
    resize: none;
}

/* Building Info Card */
.building-card {
    position: fixed;
    bottom: 10%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(5, 5, 16, 0.9);
    backdrop-filter: blur(20px);
    border: 2px solid var(--accent-primary);
    padding: 2rem;
    border-radius: 8px;
    max-width: 400px;
    z-index: 50;
    /* Above canvas */
    pointer-events: none;
}

.building-card.hidden {
    display: none;
}

.card-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--accent-primary);
}

.card-description {
    font-size: 0.95rem;
    line-height: 1.6;
    color: rgba(224, 230, 237, 0.9);
}

/* Menu Overlay */
#menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    z-index: 100;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s;
}

#menu-overlay.hidden {
    display: none;
}

#menu-overlay.show {
    opacity: 1;
}

.menu-content {
    position: relative;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-left: 3px solid var(--accent-primary);
    padding: 3rem;
    border-radius: 8px;
    min-width: 400px;
}

.menu-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: transparent;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}

.menu-close:hover {
    transform: rotate(90deg);
    color: var(--accent-primary);
}

.menu-content h2 {
    font-family: var(--font-heading);
    font-size: 2rem;
    margin-bottom: 2rem;
    color: var(--accent-primary);
}

.menu-list {
    list-style: none;
    margin-bottom: 2rem;
}

.menu-list li {
    margin-bottom: 1rem;
}

.menu-list a {
    display: block;
    color: var(--text-color);
    text-decoration: none;
    font-size: 1.2rem;
    padding: 1rem;
    border: 1px solid transparent;
    border-radius: 4px;
    transition: all 0.3s;
}

.menu-list a:hover {
    background: rgba(0, 240, 255, 0.1);
    border-color: var(--accent-primary);
    transform: translateX(10px);
}

.menu-footer {
    text-align: center;
    color: rgba(224, 230, 237, 0.5);
    font-size: 0.9rem;
}

/* Service Modal */
.service-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    z-index: 200;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.service-modal.active {
    opacity: 1;
    pointer-events: all;
}

.modal-card {
    background: rgba(5, 5, 16, 0.95);
    border: 3px solid var(--accent-primary);
    border-radius: 12px;
    padding: 3rem;
    max-width: 600px;
    max-height: 80vh;
    width: 90%;
    overflow-y: auto;
    position: relative;
    transform: scale(0.8);
    transition: transform 0.3s;
}

.service-modal.active .modal-card {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: transparent;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}

.modal-close:hover {
    transform: rotate(90deg);
    color: var(--accent-primary);
}

.modal-card h2 {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--accent-primary);
}

.modal-card .service-description {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 2rem;
    color: rgba(224, 230, 237, 0.9);
}

.modal-card .service-features {
    list-style: none;
    margin-bottom: 2rem;
}

.modal-card .service-features li {
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modal-card .service-features li:before {
    content: '✓';
    color: var(--accent-primary);
    font-weight: bold;
    font-size: 1.2rem;
}

.modal-card .cta-button {
    background: var(--accent-primary);
    color: var(--bg-dark);
    border: none;
    padding: 1rem 2rem;
    border-radius: 4px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.modal-card .cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 240, 255, 0.3);
}

/* Testimonial Bubble */
.testimonial-bubble {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    width: 90%;
    max-width: 500px;
    background: rgba(5, 5, 16, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 2rem;
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.testimonial-bubble.active {
    opacity: 1;
    pointer-events: all;
    transform: translate(-50%, -50%) scale(1);
}

.bubble-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: transparent;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

.bubble-close:hover {
    color: var(--accent-primary);
}

.bubble-content .stars {
    color: #ffd700;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.bubble-content .quote {
    font-size: 1.2rem;
    line-height: 1.6;
    font-style: italic;
    margin-bottom: 1.5rem;
    color: rgba(224, 230, 237, 0.9);
}

.bubble-content .author {
    font-weight: bold;
    color: var(--accent-primary);
    text-align: right;
    font-size: 1.1rem;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .hero-text h1 {
        font-size: 2.5rem;
    }

    #hero {
        left: 5%;
        width: 90%;
        top: 40%;
    }

    .stats-panel {
        bottom: 5%;
        right: 5%;
        flex-direction: column;
        gap: 1rem;
    }

    .stat-item {
        padding: 1rem;
        min-width: 120px;
    }

    .stat-number {
        font-size: 1.8rem;
    }
}