/* --- START OF FILE static/portal-styles.css (DEFINITIVE FIX) --- */

:root {
    --portal-bg-deep: #000005;
    --portal-text-primary: #e0e8ff;
    --portal-text-secondary: #a8b2e0;
    --portal-text-title: #ffffff;
    --portal-text-tagline: #c0c8f0;
    --portal-accent-primary: #00f0ff;
    --portal-accent-primary-rgb: 0, 240, 255;
    --portal-font-title: 'Orbitron', sans-serif;
    --portal-font-mono: 'Roboto Mono', monospace;
    --portal-transition-fast: all 0.25s ease-out;
    --portal-border-radius: 8px;
}

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

html,
body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: var(--portal-bg-deep);
}

body {
    font-family: var(--portal-font-mono);
    color: var(--portal-text-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Background container holds the canvas */
#portal-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    /* Lowest layer */
}

#interactive-particle-canvas {
    width: 100%;
    height: 100%;
    display: block;
    cursor: crosshair;
}

/* Content container is now the main layout element */
#portal-content-container {
    position: relative;
    z-index: 10;
    /* Sits ON TOP of the background/canvas */
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 2rem;
    /* FIX: We REMOVED pointer-events: none from here. Now all children are interactive. */
}




/* ══════════════════════════════════════════════════════════════════
   COMPANY WELCOME PAGE — Multi-Section Cinematic Experience
   ══════════════════════════════════════════════════════════════════ */

/* --- Master Container --- */
.nv-company-welcome {
    position: absolute;
    inset: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.nv-company-welcome * {
    pointer-events: auto;
}

/* --- Individual Sections --- */
.nv-cw-section {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem 2rem 5rem;
    opacity: 0;
    visibility: hidden;
    transform: scale(0.92);
    filter: blur(10px);
    transition: none; /* GSAP handles all transitions */
    will-change: opacity, transform, filter;
}

.nv-cw-section.active {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
    filter: blur(0px);
}

/* --- Section Icon --- */
.nv-cw-section-icon {
    font-size: 2.4rem;
    margin-bottom: 1.2rem;
    color: var(--portal-accent-primary);
    filter: drop-shadow(0 0 18px rgba(var(--portal-accent-primary-rgb), 0.5));
    opacity: 0.9;
}

/* --- Headings --- */
.nv-cw-heading {
    font-family: var(--portal-font-title);
    font-size: clamp(1.8rem, 5vw, 3.2rem);
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 2px;
    line-height: 1.2;
    margin-bottom: 0.6rem;
    text-shadow:
        0 0 20px rgba(var(--portal-accent-primary-rgb), 0.35),
        0 0 60px rgba(var(--portal-accent-primary-rgb), 0.12);
}

.nv-cw-heading.gradient-text {
    background: linear-gradient(135deg, #ffffff 0%, var(--portal-accent-primary) 50%, #7b61ff 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: nv-cw-heading-shimmer 6s ease-in-out infinite;
}

@keyframes nv-cw-heading-shimmer {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* --- Subheading --- */
.nv-cw-subheading {
    font-family: var(--portal-font-mono);
    font-size: clamp(0.85rem, 2vw, 1.15rem);
    color: var(--portal-text-tagline);
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 1.6rem;
    opacity: 0.8;
}

/* --- Body Text --- */
.nv-cw-body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: clamp(0.95rem, 1.8vw, 1.12rem);
    line-height: 1.8;
    color: rgba(224, 232, 255, 0.82);
    max-width: 620px;
    margin: 0 auto 1.5rem;
}

.nv-cw-body strong {
    color: var(--portal-accent-primary);
    font-weight: 600;
}

/* --- Divider Line --- */
.nv-cw-divider {
    width: 60px;
    height: 2px;
    margin: 0 auto 1.8rem;
    background: linear-gradient(90deg, transparent, var(--portal-accent-primary), transparent);
    border: none;
    opacity: 0.6;
}

/* --- Logo for Section 0 --- */
.nv-cw-logo {
    width: clamp(80px, 18vw, 140px);
    height: auto;
    margin-bottom: 1.5rem;
    filter: drop-shadow(0 0 24px rgba(var(--portal-accent-primary-rgb), 0.35));
}

/* --- Begin Journey Button (Section 0) --- */
.nv-cw-begin-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 0.8rem 2rem;
    margin-top: 1.5rem;
    border: 1px solid rgba(var(--portal-accent-primary-rgb), 0.35);
    border-radius: 40px;
    background: rgba(var(--portal-accent-primary-rgb), 0.06);
    backdrop-filter: blur(12px);
    color: var(--portal-accent-primary);
    font-family: var(--portal-font-mono);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.35s ease;
    animation: nv-cw-pulse-glow 2.5s ease-in-out infinite;
}

.nv-cw-begin-btn:hover {
    background: rgba(var(--portal-accent-primary-rgb), 0.15);
    border-color: rgba(var(--portal-accent-primary-rgb), 0.6);
    box-shadow: 0 0 30px rgba(var(--portal-accent-primary-rgb), 0.25);
    transform: translateY(-2px);
}

.nv-cw-begin-btn i {
    font-size: 0.75rem;
    transition: transform 0.3s ease;
}

.nv-cw-begin-btn:hover i {
    transform: translateX(4px);
}

@keyframes nv-cw-pulse-glow {
    0%, 100% {
        box-shadow: 0 0 12px rgba(var(--portal-accent-primary-rgb), 0.1);
    }
    50% {
        box-shadow: 0 0 24px rgba(var(--portal-accent-primary-rgb), 0.25);
    }
}

/* --- Section 1 (Mission) Split Layout overrides --- */
#cw-section-1 {
    align-items: flex-start;
    padding-left: 8vw;
    text-align: left;
}
#cw-section-1 .nv-cw-divider {
    margin-left: 0;
}
#cw-section-1 .nv-cw-body {
    max-width: 45vw;
    margin-left: 0;
}


/* ══════════════════════════════════════════════════════════════
   SECTION 2 — PRODUCT SHOWCASE (Video + Compact Info)
   ══════════════════════════════════════════════════════════════ */

.nv-cw-section-product {
    justify-content: center;
    align-items: flex-start;
    padding-left: 8vw;
    gap: 0;
}

/* --- Demo Video Container --- */
.nv-cw-demo-video-wrap {
    position: absolute;
    right: 5vw;
    top: 50%;
    transform: translateY(-50%) scale(0.9);
    width: clamp(320px, 40vw, 700px);
    aspect-ratio: 16 / 9;
    border-radius: 14px;
    overflow: hidden;
    z-index: 1;
    /* Initial state — GSAP controls transform */
    opacity: 0;
    filter: blur(18px);
}

.nv-cw-unmute-overlay {
    position: absolute;
    bottom: 15px;
    left: 15px;
    background: rgba(10, 10, 26, 0.75);
    backdrop-filter: blur(8px);
    color: #fff;
    padding: 8px 16px;
    border-radius: 20px;
    border: 1px solid rgba(0, 240, 255, 0.3);
    font-family: var(--portal-font-mono);
    font-size: 0.85rem;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    transition: var(--portal-transition-fast);
}

.nv-cw-unmute-overlay:hover {
    background: rgba(0, 240, 255, 0.15);
    border-color: rgba(0, 240, 255, 0.6);
}

.nv-cw-demo-video-wrap video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 14px;
}

/* Neon glow halo behind video */
.nv-cw-demo-video-glow {
    position: absolute;
    inset: -4px;
    border-radius: 18px;
    background: linear-gradient(135deg,
        rgba(var(--portal-accent-primary-rgb), 0.25),
        rgba(123, 97, 255, 0.2),
        rgba(var(--portal-accent-primary-rgb), 0.15));
    z-index: -1;
    filter: blur(18px);
    opacity: 0;
    transition: opacity 0.6s ease;
}

.nv-cw-section-product.active .nv-cw-demo-video-glow {
    opacity: 1;
}

/* --- Product Info Block --- */
.nv-cw-product-info {
    position: relative;
    z-index: 2;
    text-align: left;
    max-width: 42vw;
    width: 100%;
    padding-right: 2vw;
}

.nv-cw-product-info .nv-cw-heading {
    font-size: clamp(1.4rem, 4vw, 2.4rem);
    margin-bottom: 0.3rem;
    /* Initial state for glitch anim */
    opacity: 0;
    clip-path: inset(0 100% 0 0);
}

.nv-cw-product-info .nv-cw-subheading {
    margin-bottom: 0.8rem;
    font-size: clamp(0.72rem, 1.6vw, 0.95rem);
    color: var(--portal-accent-primary);
    /* Initial state for typewriter */
    opacity: 0;
}

.nv-cw-product-info .nv-cw-body {
    margin-bottom: 0;
    font-size: clamp(0.85rem, 1.5vw, 1.05rem);
    line-height: 1.8;
    text-align: justify;
    color: rgba(255, 255, 255, 0.85);
}

/* Individual animated lines */
.s2-line {
    display: inline;
    opacity: 0;
}

.s2-line[data-s2-anim="slide-in"] {
    /* Transforms ignored on inline, but kept for fallback */
    transform: translateX(-30px);
}

/* Glitch effect keyframes for heading */
@keyframes s2-glitch-clip {
    0% { clip-path: inset(0 100% 0 0); }
    15% { clip-path: inset(0 60% 0 0); }
    16% { clip-path: inset(20% 55% 40% 0); }
    18% { clip-path: inset(0 50% 0 0); }
    30% { clip-path: inset(0 35% 0 0); }
    31% { clip-path: inset(40% 30% 10% 0); }
    33% { clip-path: inset(0 25% 0 0); }
    50% { clip-path: inset(0 15% 0 0); }
    60% { clip-path: inset(0 8% 0 0); }
    61% { clip-path: inset(10% 5% 60% 0); }
    63% { clip-path: inset(0 3% 0 0); }
    80% { clip-path: inset(0 1% 0 0); }
    100% { clip-path: inset(0 0% 0 0); }
}

/* Typewriter cursor for subheading */
.s2-typewriter-cursor::after {
    content: '|';
    color: var(--portal-accent-primary);
    animation: s2-cursor-blink 0.7s step-end infinite;
    margin-left: 2px;
    font-weight: 300;
}

@keyframes s2-cursor-blink {
    50% { opacity: 0; }
}





/* ══════════════════════════════════════════════════════════════
   FEATURES GRID (Section 3)
   ══════════════════════════════════════════════════════════════ */

.nv-cw-features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    max-width: 780px;
    width: 90%;
    margin: 0 auto;
}

.nv-cw-feature-card {
    background: rgba(10, 12, 28, 0.55);
    backdrop-filter: blur(16px) saturate(1.3);
    border: 1px solid rgba(var(--portal-accent-primary-rgb), 0.1);
    border-radius: 16px;
    padding: 20px 16px;
    text-align: center;
    transition: all 0.35s ease;
    position: relative;
    overflow: hidden;
}

.nv-cw-feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--portal-accent-primary), transparent);
    opacity: 0;
    transition: opacity 0.35s ease;
}

.nv-cw-feature-card:hover {
    border-color: rgba(var(--portal-accent-primary-rgb), 0.3);
    transform: translateY(-3px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3),
                0 0 20px rgba(var(--portal-accent-primary-rgb), 0.08);
}

.nv-cw-feature-card:hover::before {
    opacity: 1;
}

.nv-cw-feature-card .card-icon {
    font-size: 1.5rem;
    color: var(--portal-accent-primary);
    margin-bottom: 10px;
    filter: drop-shadow(0 0 8px rgba(var(--portal-accent-primary-rgb), 0.3));
}

.nv-cw-feature-card .card-title {
    font-family: var(--portal-font-title);
    font-size: 0.72rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.nv-cw-feature-card .card-desc {
    font-family: 'Inter', sans-serif;
    font-size: 0.78rem;
    color: rgba(224, 232, 255, 0.6);
    line-height: 1.5;
}


/* ══════════════════════════════════════════════════════════════
   CTA SECTION (Section 4)
   ══════════════════════════════════════════════════════════════ */

.nv-cw-cta-group {
    display: flex;
    gap: 16px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

.nv-cw-cta-primary {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 0.9rem 2.4rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.03);
    background: linear-gradient(135deg, #181a22, #0d0f14, #12141a, #08090c);
    background-size: 300% 300%;
    animation: dark-liquid-gradient 12s ease-in-out infinite;
    color: #e0e8ff;
    font-family: var(--portal-font-mono);
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 
        0 10px 20px rgba(0, 0, 0, 0.6),
        4px 8px 12px rgba(0, 0, 0, 0.5),
        inset 1px 1px 2px rgba(255, 255, 255, 0.12),
        inset 0 2px 4px rgba(255, 255, 255, 0.05),
        inset -2px -4px 6px rgba(0, 0, 0, 0.5),
        inset -1px -1px 2px rgba(0, 0, 0, 0.8);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
    overflow: hidden;
    z-index: 1;
}

.nv-cw-cta-primary:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 15px 25px rgba(0, 0, 0, 0.7),
        6px 12px 16px rgba(0, 0, 0, 0.6),
        inset 1px 1px 2px rgba(255, 255, 255, 0.18),
        inset 0 2px 4px rgba(255, 255, 255, 0.08),
        inset -2px -4px 6px rgba(0, 0, 0, 0.6),
        inset -1px -1px 2px rgba(0, 0, 0, 0.9);
    color: #ffffff;
}

.nv-cw-cta-primary:active {
    transform: translateY(2px);
    box-shadow: 
        0 2px 5px rgba(0, 0, 0, 0.8),
        inset 2px 4px 6px rgba(0, 0, 0, 0.7),
        inset 1px 1px 2px rgba(0, 0, 0, 0.9),
        inset -1px -1px 2px rgba(255, 255, 255, 0.05);
}

@keyframes dark-liquid-gradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.nv-cw-cta-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0.85rem 2rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(8px);
    color: rgba(224, 232, 255, 0.8);
    font-family: var(--portal-font-mono);
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.35s ease;
}

.nv-cw-cta-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}


/* ══════════════════════════════════════════════════════════════
   NAVIGATION — Dots + Forward Button
   ══════════════════════════════════════════════════════════════ */

.nv-cw-nav-dots {
    position: fixed;
    right: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 30;
    pointer-events: auto;
}

.nv-cw-nav-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: all 0.4s ease;
}

.nv-cw-nav-dot.active {
    background: var(--portal-accent-primary);
    box-shadow: 0 0 12px rgba(var(--portal-accent-primary-rgb), 0.6);
    transform: scale(1.4);
    border-color: transparent;
}

.nv-cw-nav-dot.visited {
    background: rgba(var(--portal-accent-primary-rgb), 0.4);
    border-color: rgba(var(--portal-accent-primary-rgb), 0.2);
}




/* ══════════════════════════════════════════════════════════════
   KEYBOARD HINT
   ══════════════════════════════════════════════════════════════ */

.nv-cw-key-hint {
    position: fixed;
    bottom: 4.5rem;
    right: 2rem;
    font-family: var(--portal-font-mono);
    font-size: 0.65rem;
    color: rgba(224, 232, 255, 0.3);
    letter-spacing: 0.5px;
    z-index: 30;
    pointer-events: none;
    opacity: 0;
    transition: opacity 1s ease 3s;
}

.nv-cw-key-hint.visible {
    opacity: 1;
}

.nv-cw-key-hint kbd {
    display: inline-block;
    padding: 1px 6px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.05);
    font-size: 0.6rem;
    margin: 0 2px;
}


/* ══════════════════════════════════════════════════════════════
   RESPONSIVE BREAKPOINTS
   ══════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
    .nv-cw-section {
        padding: 1.5rem 1.2rem 5rem;
    }

    .nv-cw-features-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        width: 95%;
    }

    .nv-cw-feature-card {
        padding: 16px 12px;
    }

    .nv-cw-feature-card .card-icon {
        font-size: 1.3rem;
    }

    .nv-cw-feature-card .card-title {
        font-size: 0.68rem;
    }

    .nv-cw-feature-card .card-desc {
        font-size: 0.72rem;
    }

    .nv-cw-body {
        font-size: 0.92rem;
        max-width: 90%;
    }

    .nv-cw-cta-group {
        flex-direction: column;
    }

    .nv-cw-nav-dots {
        right: 1rem;
    }

    .nv-cw-key-hint {
        display: none;
    }
}

@media (max-width: 480px) {
    .nv-cw-section {
        padding: 1rem 1rem 5rem;
    }

    .nv-cw-heading {
        font-size: clamp(1.4rem, 6vw, 2rem);
        letter-spacing: 1px;
    }

    .nv-cw-subheading {
        font-size: 0.75rem;
    }

    .nv-cw-features-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .nv-cw-feature-card {
        padding: 14px 10px;
    }

    .nv-cw-feature-card .card-icon {
        font-size: 1.1rem;
        margin-bottom: 6px;
    }

    .nv-cw-feature-card .card-title {
        font-size: 0.62rem;
    }

    .nv-cw-feature-card .card-desc {
        font-size: 0.68rem;
    }

    .nv-cw-logo {
        width: clamp(60px, 20vw, 100px);
    }

    .nv-cw-begin-btn {
        padding: 0.7rem 1.6rem;
        font-size: 0.78rem;
    }
}