/* --- 1. GLOBAL & SETUP --- */
:root {
    --bg-color: #000000;
    --text-color: #e4e6eb;
    --accent-color: #ffffff;
    --surface-color: #1a1a1a;
    --surface-light: #0A0A0A;
    --transition-speed: 0.5s;
}

body {
    margin: 0;
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
}

/* LOADER */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000000;
    z-index: 9999;
    transition: opacity 0.75s ease-in-out;
}

#loading-screen.fade-out {
    opacity: 0;
    pointer-events: none;
}

#main-content.hidden {
    opacity: 0;
    visibility: hidden;
}

/* --- 2. LAYOUT & CORE STRUCTURE --- */
.navbar {
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    padding: 0.25rem 2rem;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 100;
    box-sizing: border-box;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-left,
.nav-right {
    flex: 1;
}

.logo-container {
    flex: 1;
    display: flex;
    justify-content: center;
}

.logo img {
    height: 100px;
    width: auto;
}

.logotext img {
    height: 50px;
    width: auto;
}

.hero-section {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.features-wrapper {
    height: 500vh;
    position: relative;
}

.features-section {
    height: 100vh;
    width: 100%;
    position: sticky;
    top: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

/* --- 3. COMPONENT STYLES --- */

/* Hero */
.visual-content {
    text-align: center;
}

.demo-reel {
    width: 100%;
    height: 90%;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.7);
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Updated iframe styles */
.demo-reel iframe {
    width: 90vw;
    height: 80vh;
    border: none;
}

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    width: 24px;
    height: 24px;
    border-left: 3px solid var(--accent-color);
    border-bottom: 3px solid var(--accent-color);
    transform: translateX(-50%) rotate(-45deg);
    animation: bounce 2.2s infinite cubic-bezier(0.25, 1, 0.5, 1);
    transition: opacity 0.4s ease-out;
}

@keyframes bounce {
    0%,
    100% {
        transform: translateX(-50%) translateY(0) rotate(-45deg);
    }
    50% {
        transform: translateX(-50%) translateY(-15px) rotate(-45deg);
    }
}

/* Interactive Scroller */
.interactive-scroller {
    display: flex;
    max-width: 1400px;
    width: 100%;
    padding: 0 2rem;
    gap: 2rem;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
}

.text-reel-container,
.sticky-photo-container,
.media-reel-container {
    display: flex;
    align-items: center;
    justify-content: center;
}

.text-reel-container {
    flex-basis: 25%;
}

.text-reel {
    height: 250px;
    width: 100%;
    overflow: hidden;
}

.text-strip {
    transition: transform var(--transition-speed) ease-out;
}

.text-item {
    height: 250px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: opacity var(--transition-speed) ease-in-out;
    opacity: 0.3;
}

.text-item.active {
    opacity: 1;
}

.text-item h3 {
    font-size: 2.2rem;
    color: var(--accent-color);
    margin: 0 0 0.5rem 0;
    font-weight: 900;
}

.text-item p {
    font-size: 1.1rem;
    line-height: 1.6;
}

.sticky-photo-container {
    flex-basis: 40%;
}

.sticky-photo img {
    max-width: 100%;
    border-radius: 12px;
}

/* Styles for the 3D canvas (desktop) */
.sticky-photo canvas {
    display: block;
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 1 / 1;
    cursor: grab;
}

.media-reel-container {
    flex-basis: 25%;
}

.media-reel {
    width: 100%;
    height: 250px;
    border-radius: 12px;
    overflow: hidden;
    background-color: var(--surface-color);
}

.media-strip {
    transition: transform var(--transition-speed) ease-out;
}

.media-item {
    width: 100%;
    height: 250px;
}

.media-item img,
.media-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Info Section - FIXED */
.info-section {
    min-height: 100vh;
    padding: 80px 2rem;
    background-color: black;
    display: flex;
    align-items: center;
}

.info-container {
    max-width: 1600px;  /* Increased from 1400px */
    width: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: row;
    gap: 4rem;
    align-items: center;
}

.info-media {
    flex: 0 0 50%;
    position: relative;
    width: 50%;
    height: 600px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.info-video {
    width: 100%;
    height: 100%;
    border-radius: 16px;
    object-fit: contain;  /* Changed from cover to contain */
}

.info-text {
    /* flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 2rem; */
    max-width: 100vw;
}

.info-title {
    font-size: 3.5rem;
    font-weight: 900;
    color: #ffffff;
    margin: 0 0 1.5rem 0;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.info-subtitle {
    font-size: 3rem;
    font-weight: 900;
    color: #ffffff;
    margin: 3rem 0 0 0;
    letter-spacing: -0.02em;
    line-height: 1.15;
}

.info-description {
    font-size: 1.2rem;
    line-height: 1.8;
    margin: 0 0 0rem 0;
    color: #e4e6eb;
    font-weight: 400;
    max-width: 100vw;  /* Removed width restriction */
}

.info-description:first-of-type {
    font-size: 1.4rem;
    font-weight: 500;
    margin-bottom: 2rem;
}

/* Footer */
.launch-info {
    text-align: center;
    padding: 2rem 2rem;
    background-color: black;
}

.launch-info .fine-print {
    font-size: 0.8rem;
    color: #a0a0a0;
    margin-top: 1rem;
}

.launch-info h2 {
    font-size: 3.0rem;
    color: white;
    margin: 0;
}

.launch-info p {
    font-size: 3rem;
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
    color: white;
}

/* --- 4. UTILITIES --- */
.contact-button {
    display: inline-block;
    padding: 10px 20px;
    margin-top: 5px;
    margin-bottom: 20px;
    border: 2px solid white;
    border-radius: 25px;
    color: white;
    text-decoration: none;
    font-size: 16px;
    font-weight: bold;
    text-align: center;
    transition: background-color 0.3s, color 0.3s;
}

.contact-button:hover {
    background-color: white;
    color: #1a1a1a;
}

.model-viewer-container {
    position: relative;
    width: 90%;
    max-width: 100%;
    aspect-ratio: 1 / 1;
    margin: auto;
}

/* --- 5. MOBILE STYLES --- */
.mobile-scroller {
    display: none;
}

.mentions {
    font-size: 5px;
}

#quest-canvas-mobile {
    position: absolute;
    top: 0;
    bottom: 50%;
    width: 80%;
    height: 80%;
    z-index: 2;
}

#gyro-permission-btn {
    position: absolute;
    bottom: 15%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: bold;
    color: #000;
    background-color: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 30px;
    cursor: pointer;
    backdrop-filter: blur(5px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

#gyro-permission-btn:hover {
    transform: translateX(-50%) scale(1.05);
    background-color: white;
}

/* --- 6. RESPONSIVE BREAKPOINTS --- */

/* Laptop and smaller desktops - CENTERED STACK LAYOUT */
@media (min-width: 901px) and (max-width: 1200px) {
    .info-section {
        padding: 40px 20px;
        min-height: 100vh;
        display: flex;
        align-items: center;
        justify-content: center;  /* Center the section content */
    }
    
    .info-container {
        max-width: 85%;  /* Use 85% of screen width */
        width: 85%;
        display: flex;
        flex-direction: column;
        gap: 1.5rem;
        padding: 0;
        align-items: center;  /* Center horizontally */
        justify-content: center;
        margin: 0 auto;  /* Center the container */
    }
    
    .info-media {
        flex: none;
        width: 350px;  /* Fixed width */
        height: 350px;
        display: flex;
        align-items: center;
        justify-content: center;
        margin: 0 auto;  /* Center the media */
    }
    
    .info-video {
        width: 100%;
        height: 100%;
        object-fit: contain;
        border-radius: 16px;
    }
    
    .info-text {
        flex: none;
        width: 100%;  /* Full width of container */
        max-width: none;
        padding: 0;
        text-align: left;
        margin: 0 auto;  /* Center the text block */
    }
    
    .info-title {
        font-size: 3rem;
        margin-bottom: 1rem;
        margin-top: 0;
        width: 100%;
        text-align: left;
    }
    
    .info-subtitle {
        font-size: 2.7rem;
        margin-top: 2rem;
        width: 100%;
        text-align: left;
    }
    
    .info-description {
        font-size: 1.25rem;
        line-height: 1.8;
        max-width: none !important;
        width: 100% !important;
        margin-bottom: 1.2rem;
        padding: 0;
        text-align: left;
    }
    
    .info-description:first-of-type {
        font-size: 1.4rem;
        margin-bottom: 1.2rem;
        margin-top: 0;
        width: 100% !important;
    }
    
    /* CRITICAL: Hide ALL stray elements that shouldn't be there */
    .info-container > *:not(.info-media):not(.info-text) {
        display: none !important;
        visibility: hidden !important;
        width: 0 !important;
        height: 0 !important;
        overflow: hidden !important;
        position: absolute !important;
        left: -9999px !important;
    }
    
    /* Hide any floating Gracia AI elements */
    .info-container img:not(.info-video),
    .info-container .powered-by,
    .info-container [class*="gracia"],
    .info-container [class*="logo"]:not(.info-video) {
        display: none !important;
        position: absolute !important;
        left: -9999px !important;
    }
}

/* Tablets */
@media (max-width: 900px) {
    .features-wrapper {
        display: none;
    }

    .mobile-scroller {
        display: block;
        height: 100%;
        overflow-y: scroll;
        scroll-snap-type: y mandatory;
        padding-top: 60px;
        box-sizing: border-box;
    }

    .mobile-slide {
        height: 60vh;
        scroll-snap-align: start;
        background-color: var(--surface-color);
        border-radius: 25px;
        overflow: hidden;
        margin: 0 1rem 1rem 1rem;
        display: flex;
        flex-direction: column;
    }

    .mobile-media {
        flex: 1;
        overflow: hidden;
        display: flex;
        justify-content: center;
        align-items: center;
        padding: 1.5rem;
    }

    .mobile-media img,
    .mobile-media video,
    .mobile-media canvas {
        width: 100%;
        height: 100%;
        object-fit: cover;
        border-radius: 15px;
    }

    .mobile-text {
        flex: 1;
        padding: 1rem 1.5rem;
        display: flex;
        flex-direction: column;
        text-align: left;
    }

    .mobile-text h3 {
        font-size: 1.5rem;
        margin: 0 0 0.5rem 0;
        color: var(--accent-color);
        font-weight: 700;
    }

    .mobile-text p {
        font-size: 0.95rem;
        line-height: 1.5;
        margin: 0;
    }

    /* Info section mobile */
    .info-section {
        min-height: auto;
        padding: 60px 1rem 40px;
    }

    .info-container {
        display: flex;
        flex-direction: column;
        gap: 2rem;
    }

    .info-media {
        flex: none;
        width: 100%;
        height: 50vh;
        min-height: 400px;
    }

    .info-text {
        flex: none;
        padding: 0 1rem;
        text-align: center;
    }

    .info-title {
        font-size: 2.2rem;
    }

    .info-subtitle {
        font-size: 2rem;
        margin-top: 2rem;
    }

    .info-description {
        font-size: 1.05rem;
    }

    .info-description:first-of-type {
        font-size: 1.2rem;
    }

    #quest-canvas-mobile {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        z-index: 1;
    }
}

/* Mobile phones */
@media (max-width: 768px) {
    .mobile-slide {
        margin: 0 0.5rem 1rem 0.5rem;
    }

    .demo-reel {
        width: 100vw;
        height: 80vh;
        border-radius: 0;
    }

    .demo-reel iframe {
        width: 100vw;
        height: 80vh;
    }

    .logo img {
        height: 70px;
        width: auto;
    }

    .info-section {
        padding: 50px 1rem 30px;
    }

    .info-media {
        height: 40vh;
        min-height: 300px;
    }

    .info-title {
        font-size: 2rem;
    }

    .info-subtitle {
        font-size: 1.8rem;
    }

    .info-description {
        font-size: 1rem;
    }

    .info-description:first-of-type {
        font-size: 1.1rem;
        margin-bottom: 1.5rem;
    }

    #quest-canvas-mobile {
        position: absolute;
        bottom: 0;
        left: 50%;
        transform: translate(-50%, -45%);
        width: 100%;
        height: 100%;
        z-index: 2;
    }

    #gyro-permission-btn {
        position: absolute;
        z-index: 10;
        left: 50%;
        top: 75%;
        transform: translate(-50%, -50%);
        padding: 12px 24px;
        font-size: 16px;
        font-weight: bold;
        color: #000000;
        background-color: rgba(255, 255, 255, 0.9);
        border: none;
        border-radius: 30px;
        cursor: pointer;
        backdrop-filter: blur(5px);
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    }
}