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

body, html {
    width: 100vw;
    height: 100vh;
    overflow: hidden; /* strictly one page, no scrolling */
    /* Seamlessly continues the image's subtle gradient upwards, and perfectly matches it downwards */
    background: linear-gradient(
        to bottom, 
        rgb(0, 105, 252) 0%, 
        rgb(3, 124, 252) 52vh, 
        rgb(15, 140, 252) 100vh
    ); 
    display: flex;
    flex-direction: column;
    align-items: center;
    font-family: 'Outfit', sans-serif;
}

.content-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding-top: 10vh; /* Shifted down for better vertical layout */
}

.top-video-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 2vh; /* Relaxed spacing */
    position: relative;
    flex-shrink: 0;
}

#topVideo {
    max-width: 80vw;
    max-height: 25vh; /* Perfect size for the layout */
    object-fit: contain;
    flex-shrink: 0;
    /* Filter moved to container for iOS Safari compatibility */
}

.top-video-container {
    filter: url(#remove-black);
    -webkit-filter: url(#remove-black);
    will-change: filter;
    transform: translate3d(0, 0, 0);
}

.mobile-only-canvas {
    display: none;
}

.waitlist-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: white;
    text-align: center;
    margin-top: 1.5rem; /* Pushed down relative to the logo */
    position: relative;
    z-index: 10; /* Ensures the waitlist remains clickable */
}

.title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1.5vh; /* Relaxed spacing */
    letter-spacing: 1px;
    text-shadow: 0 4px 15px rgba(0,0,0,0.1);
    line-height: 1.1;
}

.subtitle {
    font-size: 1.1rem;
    font-weight: 500;
    opacity: 0.95;
    margin-bottom: 3vh; /* Relaxed spacing */
    max-width: 600px;
    line-height: 1.4;
}

.waitlist-form {
    display: flex;
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid #ffffff;
    border-radius: 50px;
    padding: 0.3rem;
    width: 420px;
    transition: all 0.3s ease;
}

.waitlist-form:focus-within {
    background: rgba(255, 255, 255, 0.25);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.4);
}

.email-input {
    flex: 1;
    background: transparent;
    border: none;
    color: white;
    padding: 0.8rem 1.2rem;
    font-size: 1.05rem;
    font-family: inherit;
    outline: none;
}

/* Fix browser autofill styling overriding transparent background */
.email-input:-webkit-autofill,
.email-input:-webkit-autofill:hover, 
.email-input:-webkit-autofill:focus, 
.email-input:-webkit-autofill:active {
    transition: background-color 5000s ease-in-out 0s;
    -webkit-text-fill-color: white !important;
}

.email-input::placeholder {
    color: rgba(255, 255, 255, 0.85);
    font-weight: 300;
}

.submit-btn {
    background: white;
    color: #0479F9;
    border: none;
    border-radius: 40px;
    padding: 0 1.5rem;
    font-weight: 600;
    font-family: inherit;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.submit-btn:hover {
    background: #f0f0f0;
    transform: scale(1.03);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.social-proof {
    margin-top: 1rem;
    font-size: 0.9rem;
    opacity: 0.8;
    font-weight: 300;
}

.bg-people-wrapper {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    height: 36vh; /* Reduced to ensure it never touches the text */
    /* Double the width to fit two images side-by-side (2.52025 * 2 = 5.0405) */
    width: calc(36vh * 5.0405);
    display: flex; /* Align images side by side */
    z-index: 1;
    pointer-events: none; /* so it doesn't block clicks */
}

.bg-people-img {
    width: 50%; /* Each image takes up exactly half the doubled wrapper */
    height: 100%;
    object-fit: contain;
    object-position: bottom;
}

.bottom-line {
    position: fixed;
    bottom: 1.5vh;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 0.95rem;
    font-weight: 600;
    opacity: 0.9;
    z-index: 10;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

/* Cute Cloud Cursor Trail Effect */
.cursor-cloud {
    position: fixed;
    pointer-events: none;
    font-size: 24px;
    z-index: 9999;
    transform: translate(-50%, -50%);
    animation: floatUpFade 1.2s ease-out forwards;
    /* Removed drop-shadow filter to prevent rendering lag on page scroll/mouse move */
}

@keyframes floatUpFade {
    0% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(0.5);
    }
    50% {
        opacity: 0.8;
        transform: translate(-50%, -100%) scale(1.2);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -150%) scale(1.5);
    }
}

/* --- Mobile Responsiveness --- */
@media (max-width: 768px) {
    body, html {
        position: fixed; /* Physically disables iOS scroll bounce */
        width: 100%;
        height: 100%;
        overflow: hidden;
    }

    .content-container {
        padding-top: 10vh; /* Push content down to avoid overlapping the top nav */
        justify-content: flex-start; /* Prevent flex centering from clipping the top of the content */
    }
    
    .top-nav {
        position: absolute;
        top: 2vh;
        left: 0;
        right: 0;
        width: 100%;
        justify-content: center; /* Center nav on mobile */
        gap: 1.5rem;
        z-index: 9999;
    }
    
    .nav-link {
        font-size: 0.9rem;
    }

    .title {
        font-size: 2.2rem;
        padding: 0 1rem;
    }

    .subtitle {
        font-size: 1rem;
        padding: 0 1.5rem;
        margin-bottom: 2vh;
    }

    /* Stack the email input and button on mobile */
    .waitlist-form {
        width: 90%;
        max-width: 350px;
        flex-direction: column;
        border-radius: 20px;
        padding: 0.5rem;
    }

    .email-input {
        width: 100%;
        text-align: center;
        border-radius: 15px;
        padding: 1rem;
    }

    .submit-btn {
        width: 100%;
        padding: 1rem;
        margin-top: 0.5rem;
        border-radius: 15px;
    }

    /* Reduce popup padding so it fits on screen */
    .popup-content {
        padding: 0;
        width: 95%;
    }

    .popup-inner {
        padding: 1.5rem;
    }

    .popup-content h2 {
        font-size: 1.6rem;
        margin-bottom: 1rem;
    }

    .popup-content p, .popup-content li {
        font-size: 1rem;
    }
    
    .close-btn {
        top: 1rem;
        right: 1rem;
    }
}

/* Top Navigation */
.top-nav {
    position: absolute;
    top: 4vh;
    right: 4vw;
    display: flex;
    gap: 2rem;
    z-index: 50;
}

.nav-link {
    background: transparent;
    border: none;
    color: white;
    font-size: 1.05rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    opacity: 0.8;
    transition: all 0.3s ease;
    letter-spacing: 1px;
}

.nav-link:hover {
    opacity: 1;
    transform: translateY(-2px);
    text-shadow: 0 0 10px rgba(255,255,255,0.5);
}

/* Popups */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(20, 20, 20, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.popup-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.popup-content {
    background: rgba(20, 20, 20, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 30px;
    padding: 0; /* Clear padding so inner scrollbar clips correctly */
    width: 90%;
    max-width: 800px;
    overflow: hidden; /* Clips the inner container's scrollbar to the border radius */
    color: white;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    position: relative;
    transform: translateY(20px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: left;
}

.popup-inner {
    padding: 3rem; /* Padding moved here */
    max-height: 85vh; /* Max height moved here */
    overflow-y: auto; /* Enable scrollbar only on inner container */
}

/* Beautiful Custom Scrollbar for the Popup Inner */
.popup-inner::-webkit-scrollbar {
    width: 8px;
}
.popup-inner::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}
.popup-inner::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
}
.popup-inner::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

.popup-overlay.active .popup-content {
    transform: translateY(0) scale(1);
}

.popup-content h2 {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    text-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

/* Premium Features Layout Styles */
.popup-hero h2 {
    font-size: 2.5rem;
    background: linear-gradient(to right, #ffffff, #a0c4ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
    text-shadow: none;
}
.popup-hero p {
    font-size: 1.2rem;
    color: rgba(255,255,255,0.9);
    line-height: 1.5;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}
.feature-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}
.feature-card:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    border-color: rgba(255, 255, 255, 0.4);
}
.feature-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
}
.feature-card h4 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: white;
}
.feature-card p {
    font-size: 0.95rem;
    color: rgba(255,255,255,0.7);
    line-height: 1.4;
    margin: 0;
}

.meta-glasses-hero {
    background: linear-gradient(135deg, rgba(255,255,255,0.15), rgba(255,255,255,0.05));
    border: 1px solid rgba(255,255,255,0.4);
    border-radius: 24px;
    padding: 2.5rem;
    text-align: center;
    margin: 3rem 0;
    position: relative;
    overflow: hidden;
    box-shadow: 0 0 30px rgba(255,255,255,0.1);
}
.meta-glasses-hero::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 50%; height: 100%;
    background: linear-gradient(to right, transparent, rgba(255,255,255,0.2), transparent);
    transform: skewX(-25deg);
    animation: shine 4s infinite;
}
@keyframes shine {
    0% { left: -100%; }
    20% { left: 200%; }
    100% { left: 200%; }
}
.meta-icon {
    font-size: 3.5rem;
    margin-bottom: 1rem;
}
.meta-glasses-hero h3 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 1rem;
}
.meta-glasses-hero p {
    font-size: 1.15rem;
    max-width: 600px;
    margin: 0 auto;
}

.future-vision-box {
    background: rgba(0, 0, 0, 0.2);
    border-left: 4px solid #a0c4ff;
    padding: 1.5rem 2rem;
    border-radius: 0 16px 16px 0;
}
.future-vision-box p {
    margin: 0;
    font-style: italic;
    color: rgba(255,255,255,0.8);
}

/* Devices Grid in Popup */
.devices-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}
.device-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
}
.device-card:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}
.popup-device-logo {
    height: 45px;
    width: auto;
    margin-bottom: 1.2rem;
    object-fit: contain;
}
.popup-device-logo.apple {
    filter: brightness(0) invert(1);
}
.device-card h4 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: white;
}
.device-card p {
    font-size: 0.95rem !important;
    color: rgba(255,255,255,0.7) !important;
    margin: 0 !important;
    line-height: 1.4 !important;
}

.popup-section-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 2.5rem 0 1rem 0;
    color: #fff;
    border-bottom: 1px solid rgba(255,255,255,0.2);
    padding-bottom: 0.5rem;
}

.popup-content p, .popup-content li {
    font-size: 1.15rem;
    line-height: 1.6;
    margin-bottom: 1rem;
    opacity: 0.95;
}

.popup-content ul {
    list-style-type: none;
    margin-top: 1rem;
}

.popup-content li {
    position: relative;
    padding-left: 2rem;
    margin-bottom: 1.2rem;
}

.popup-content li::before {
    content: "☁️";
    position: absolute;
    left: 0;
    top: 2px;
    font-size: 1rem;
}

.close-btn {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: transparent;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
    line-height: 1;
}

.close-btn:hover {
    opacity: 1;
}

/* --- Intro Sequence --- */
#introOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgb(0, 105, 252);
    animation: bgPulse 0.8s infinite alternate steps(1);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease;
}

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

.intro-text {
    font-size: 2rem;
    font-weight: 800;
    color: white;
    letter-spacing: 2px;
    text-transform: uppercase;
    cursor: pointer;
    user-select: none;
    animation: textPulse 0.8s infinite alternate steps(1);
}

@keyframes bgPulse {
    0%, 50% { background-color: rgb(0, 105, 252); }
    50.01%, 100% { background-color: #ffffff; }
}

@keyframes textPulse {
    0%, 50% { color: #ffffff; }
    50.01%, 100% { color: rgb(0, 105, 252); }
}

/* Background floating clouds */
.clouds-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
    opacity: 0.6;
    perspective: 1000px;
    transform-style: preserve-3d;
}

.clouds-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
    opacity: 0.6;
}

.bg-cloud {
    position: absolute;
    animation-name: floatCloud;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
    will-change: transform; /* Force hardware acceleration */
    transform: translate3d(-20vw, 0, 0) rotate(0.01deg); /* Initial state on GPU layer */
    backface-visibility: hidden; /* Fixes subpixel jitter */
    -webkit-backface-visibility: hidden;
    -webkit-font-smoothing: subpixel-antialiased;
}

@keyframes floatCloud {
    from { transform: translate3d(-20vw, 0, 0) rotate(0.01deg); }
    to { transform: translate3d(120vw, 0, 0) rotate(0.01deg); }
}

.intro-enter-text {
    font-size: 1.6rem;
    font-weight: 800;
    color: white;
    letter-spacing: 4px;
    text-transform: uppercase;
    cursor: pointer;
    animation: pulseHint 2s infinite ease-in-out;
    user-select: none;
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

@keyframes pulseHint {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 1; }
}

/* --- Mobile Optimizations --- */
@media (max-width: 768px) {
    .waitlist-form {
        flex-direction: row;
        width: 100%;
        max-width: 360px;
        margin: 0 auto;
        border-radius: 50px;
        padding: 0.3rem;
        background: rgba(255, 255, 255, 0.15);
    }
    
    .email-input {
        width: auto;
        flex: 1;
        text-align: left;
        padding: 0.8rem 1rem;
        margin-bottom: 0;
        font-size: 0.95rem;
    }

    .submit-btn {
        width: auto;
        padding: 0.8rem 1.2rem;
        border-radius: 40px;
        font-size: 0.95rem;
        white-space: nowrap;
    }

    .title {
        font-size: 2.2rem;
        line-height: 1.1;
        margin-bottom: 0.5rem;
    }
    
    .subtitle {
        font-size: 0.95rem;
        padding: 0 1rem;
        margin-bottom: 1.2rem;
    }

    #topVideo {
        /* Hide native video to avoid Apple bugs, but DO NOT use display: none 
           otherwise iOS Safari suspends the decoding engine and it won't play */
        opacity: 0.001 !important;
        position: absolute !important;
        width: 1px !important;
        height: 1px !important;
        pointer-events: none !important;
        z-index: -1;
    }
    
    .mobile-only-canvas {
        display: block !important;
        height: 20vh; /* Scaled down perfectly */
        width: auto;
        max-width: 100vw;
        object-fit: contain;
    }
    
    .bg-people-wrapper {
        height: 25vh; /* Scale down the people to give the text box more room */
        width: calc(25vh * 5.0405);
    }
    
    .top-video-container {
        margin-top: 2vh; 
        filter: none !important;
        -webkit-filter: none !important;
    }
    
    .top-nav {
        padding: 0.5rem;
    }
    
    .nav-link {
        font-size: 0.95rem;
        padding: 0.5rem 1rem;
    }
}