@import url('https://fonts.googleapis.com/css2?family=Be+Vietnam+Pro:wght@300;400;500;700;800&display=swap');

:root {
    --bg-color: #0a0a0f;
    --text-color: #e4e4e7;
    --text-light: #a1a1aa;
    --primary-color: #8b5cf6;
    --primary-glow: rgba(139, 92, 246, 0.5);
}

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

html {
    font-size: 16px;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Inter', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow: hidden; /* Prevent native browser scrolling */
}

/* Loader */
#loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-color);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
    transition: opacity 0.5s ease;
}
.loader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}
.loader-content img {
    width: 60px;
    animation: pulse 2s infinite ease-in-out;
}
.loader-content span {
    font-weight: 500;
    color: var(--text-light);
}
@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.8; }
}
body.loaded #loader {
    opacity: 0;
    pointer-events: none;
}


/* Header */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1.5rem 2.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 10;
    background: linear-gradient(180deg, rgba(10, 10, 15, 0.7) 0%, rgba(10, 10, 15, 0) 100%);
}
.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}
.logo-icon { width: 40px; }
.logo-text { font-size: 1.5rem; font-weight: 800; color: var(--text-color); }

.cta-button {
    background-color: var(--primary-color);
    color: #fff;
    padding: 0.75rem 1.5rem;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 700;
    transition: all 0.3s ease;
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.4);
}
.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 30px rgba(139, 92, 246, 0.6);
}
.cta-button.large {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
}

/* WebGL Canvas */
#webgl-canvas {
    position: fixed;
    top: 0;
    left: 0;
    outline: none;
    z-index: 0;
}

/* Scroll Indicator Nav */
.scroll-indicator {
    position: fixed;
    top: 50%;
    right: 2.5rem;
    transform: translateY(-50%);
    z-index: 10;
}
.scroll-indicator ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.scroll-indicator li {
    position: relative;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.scroll-indicator .dot {
    width: 8px;
    height: 8px;
    background-color: rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    transition: all 0.3s ease;
}
.scroll-indicator li.active .dot {
    background-color: var(--primary-color);
    transform: scale(1.8);
    box-shadow: 0 0 10px var(--primary-glow);
}
.scroll-indicator .tooltip {
    position: absolute;
    right: calc(100% + 1rem);
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.7);
    color: var(--text-color);
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
}
.scroll-indicator li:hover .tooltip {
    opacity: 1;
    visibility: visible;
}


/* Scrollable Content */
.scroll-container {
    width: 100%;
    height: 100vh; /* Set height to viewport height */
    z-index: 1;
    perspective: 1000px;
    position: relative; /* Ensure z-index stacking context over fixed canvas */
}

.section {
    width: 100%;
    height: 100%; /* Make sections fill the container */
    padding: 0 5%;
    display: flex;
    justify-content: center;
    align-items: center;
    position: absolute; /* Stack sections on top of each other */
    top: 0;
    left: 0;
    transform-style: preserve-3d;
    pointer-events: none; /* Prevent sections from blocking mouse events on canvas */
}
.section-content, .pillar, .ecosystem-card {
    pointer-events: auto; /* Allow interaction with content inside sections */
}


.section-content, .pillar, .ecosystem-card {
    max-width: 900px;
    width: 100%;
    text-align: center;
    opacity: 0;
    transform: translateZ(-800px) scale(0.3); /* Adjusted for better visuals and reliability */
    will-change: transform, opacity;
}

.pillars-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 2rem;
    align-items: center;
    justify-items: center;
}

.pillar {
    position: relative;
    max-width: 450px;
    height: auto;
    text-align: left;
}

.section-content h1 {
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.04em;
    text-shadow: 0 0 40px var(--primary-glow);
}
.section-content p {
    font-size: 1.5rem;
    color: var(--text-light);
    margin-top: 1.5rem;
}

.section-content h2 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 2rem;
    text-shadow: 0 0 30px var(--primary-glow);
}
.section-content p, .pillar p, .ecosystem-card p {
    font-size: 1.25rem;
    color: var(--text-light);
    line-height: 1.7;
    max-width: 700px;
    margin: 0 auto;
}
.section-content strong {
    color: var(--text-color);
}


.pillar h3 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}
.pillar p {
    font-size: 1.1rem;
}

/* New styles for Ecosystem Section */
.ecosystem-section {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    padding: 5rem 5%;
}

.ecosystem-card h3 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.ecosystem-card p {
    font-size: 1.1rem;
}

.section-content .large {
    margin-top: 2.5rem;
}

/* Fix for final CTA button */
.section-content.final-cta {
    position: relative;
    z-index: 2; /* Ensure it's above the 3D model */
    padding-bottom: 2rem; /* Add some space at the bottom */
}

.section-content.final-cta p {
    margin-bottom: 2rem; /* Add space between text and button */
}

@media (min-width: 1024px) {
    .ecosystem-section {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 3rem;
        max-width: 1200px;
        margin: 0 auto;
    }
    .ecosystem-card {
        text-align: left;
    }
}

@media (max-width: 900px) {
    .pillars-section {
        display: flex;
        flex-direction: column;
        justify-content: center;
        padding: 1.5rem 5%;
        gap: 1rem;
        overflow: hidden; /* Prevent internal scroll to allow page swipe */
    }
    .ecosystem-section {
        padding: 3rem 5%;
        gap: 1.5rem;
        overflow: hidden; /* Prevent internal scroll */
    }
     .pillar, .ecosystem-card {
        text-align: center;
     }
}

@media (max-width: 768px) {
    /* --- GENERAL RESPONSIVENESS --- */
    .main-header {
        padding: 1rem 1.5rem;
    }
    .logo-icon {
        width: 32px;
    }
    .logo-text {
        font-size: 1.25rem;
    }
    .cta-button {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }
    .scroll-indicator {
        display: block;
        top: auto;
        bottom: 1.5rem;
        right: 50%;
        transform: translateX(50%);
    }
    .scroll-indicator ul {
        flex-direction: row;
        gap: 1.2rem;
    }
    .scroll-indicator .tooltip {
        right: 50%;
        top: auto;
        bottom: calc(100% + 0.8rem);
        transform: translateX(50%);
    }

    /* --- SECTION CONTENT SCALING --- */
    .section {
        padding: 0 8%; /* More horizontal padding to narrow content */
    }

    .section-content h1 {
        font-size: clamp(2.2rem, 10vw, 3.5rem);
    }
    .section-content p {
        font-size: 1.1rem;
        margin-top: 1rem;
    }
    .section-content h2 {
        font-size: clamp(1.8rem, 8vw, 2.8rem);
        margin-bottom: 1rem;
    }
    .section-content p, .pillar p, .ecosystem-card p {
        font-size: 1rem;
        line-height: 1.6;
    }

    /* --- PILLARS SECTION --- */
    .pillar {
        max-width: 100%;
    }
    .pillar h3 {
        font-size: 1.3rem;
        margin-bottom: 0.25rem;
    }
    .pillar p {
        font-size: 0.95rem;
        line-height: 1.4;
    }

    /* --- ECOSYSTEM SECTION --- */
    .ecosystem-card h3 {
        font-size: 1.4rem;
        margin-bottom: 0.5rem;
    }
    .ecosystem-card p {
        font-size: 0.9rem;
    }

    /* --- FINAL CTA --- */
    .section-content.final-cta p {
        font-size: 1rem;
    }
    .cta-button.large {
        padding: 0.8rem 1.8rem;
        font-size: 1rem;
    }
}
