/* ==========================================================================
   1. CSS Variables & Theme Configuration
   ========================================================================== */
:root {
    --accent-primary: #f43f5e;
    --accent-primary-rgb: 244, 63, 94;
    --accent-secondary: #fb923c;
    --accent-gradient: linear-gradient(135deg, #f43f5e 0%, #fb923c 100%);
    
    --bg-absolute: #09090b;
    --bg-dark-gray: #16161a;
    --text-pure: #ffffff;
    --text-muted: #a1a1aa;
    --text-dark-muted: #71717a;
    
    --glass-background: rgba(22, 22, 26, 0.45);
    --glass-border: rgba(255, 255, 255, 0.05);
    --glass-border-glow: rgba(244, 63, 94, 0.15);
    --glass-blur: blur(20px) saturate(180%);
    --shadow-premium: 0 20px 50px rgba(0, 0, 0, 0.6);
    
    --transition-hq: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-fast: all 0.2s ease;
}

/* ==========================================================================
   2. Global Resets & Body Typography
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    user-select: none;
    -webkit-font-smoothing: antialiased;
}

body {
    background-color: var(--bg-absolute);
    color: var(--text-pure);
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* ==========================================================================
   3. Background Layers (Video, Noise, Grid, Particles)
   ========================================================================== */
.video-background-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -2;
    overflow: hidden;
    pointer-events: none;
}

#bg-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.4;
}

.video-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    background: linear-gradient(
        to bottom,
        rgba(9, 9, 11, 0.3) 0%,
        rgba(9, 9, 11, 0.7) 100%
    );
    pointer-events: none;
}

#particleCanvas {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: -4;
    pointer-events: none;
}

.ambient-glow {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    /* FIX: Used CSS variables for 0-latency JS tracking */
    --mouse-x: 50%;
    --mouse-y: 50%;
    background: radial-gradient(circle at var(--mouse-x) var(--mouse-y), rgba(var(--accent-primary-rgb), 0.12) 0%, transparent 65%);
    z-index: -5;
    pointer-events: none;
    /* FIX: Removed transition so mouse tracking doesn't feel laggy */
    will-change: background;
}

.grid-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image: radial-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 32px 32px;
    z-index: -3;
    pointer-events: none;
}

.noise-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    opacity: 0.015;
    z-index: -2;
    pointer-events: none;
}

/* ==========================================================================
   4. Top Utility Container (Socials, Login, Showcase)
   ========================================================================== */
.top-utility-bar {
    width: 100%;
    padding: 16px 64px 0px 64px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 16px;
    position: relative;
    z-index: 100;
}

.utility-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.utility img {
    width: 16px;
    height: auto;
    display: inline-block;
    vertical-align: middle;
    transition: var(--transition-hq);
}

.btn-login {
    background: transparent;
    border: 1px solid var(--accent-primary);
    color: var(--text-pure);
    padding: 8px 18px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition-hq);
    will-change: transform, box-shadow;
}

.btn-login:hover {
    background: rgba(var(--accent-primary-rgb), 0.15);
    box-shadow: 0 0 20px rgba(var(--accent-primary-rgb), 0.3);
    transform: translateY(-2px);
}

.btn-login .btn-icon-asset {
    width: 16px;
    height: auto;
    display: block;
    transition: var(--transition-fast);
}

.btn-login:hover .btn-icon-asset {
    transform: scale(1.15);
    filter: drop-shadow(0 0 8px var(--accent-primary));
}

.btn-icon-only {
    background: transparent;
    border: 1px solid var(--accent-primary);
    width: 36px;
    height: 36px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: var(--transition-hq);
    will-change: transform, box-shadow;
}

.btn-icon-only:hover {
    background: rgba(var(--accent-primary-rgb), 0.15);
    box-shadow: 0 0 20px rgba(var(--accent-primary-rgb), 0.3);
    transform: translateY(-2px);
}

.btn-icon-only .btn-icon-asset {
    width: 16px;
    height: auto;
    display: block;
    transition: var(--transition-fast);
}

.btn-icon-only:hover .btn-icon-asset {
    transform: scale(1.15);
    filter: drop-shadow(0 0 8px var(--accent-primary));
}


/* ==========================================================================
   5. Main Navigation Bar
   ========================================================================== */
.main-navbar {
    background: var(--glass-background);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    margin: 12px 64px;
    padding: 14px 40px;
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-premium);
    position: sticky;
    top: 20px;
    z-index: 99;
    transition: var(--transition-hq);
    will-change: transform, padding, margin;
}

.main-navbar.scrolled {
    margin: 4px 64px;
    padding: 10px 40px;
    border-color: rgba(var(--accent-primary-rgb), 0.2);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), 0 0 20px rgba(var(--accent-primary-rgb), 0.05);
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-mark {
    width: 22px;
    height: 22px;
    background: var(--accent-gradient);
    clip-path: polygon(25% 0%, 100% 0%, 75% 100%, 0% 100%);
    box-shadow: 0 0 15px var(--accent-primary);
    transition: var(--transition-hq);
}

.logo-text {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 2px;
    color: var(--text-pure);
}

.logo-text span {
    font-weight: 300;
    color: var(--text-muted);
}

.nav-menu {
    display: flex;
    gap: 40px;
}

.nav-item {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.5px;
    padding: 4px 0;
    transition: var(--transition-fast);
}

.nav-item:hover, .nav-item.active {
    color: var(--text-pure);
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
}

/* FIX: Ensure mobile toggle is strictly hidden on desktop */
.mobile-toggle {
    display: none;
    background: transparent;
    border: none;
    color: var(--text-pure);
    font-size: 24px;
    cursor: pointer;
    margin-right: 15px;
}

.cart-trigger {
    background: var(--accent-gradient);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: var(--text-pure);
    font-size: 14px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    box-shadow: 0 4px 15px rgba(var(--accent-primary-rgb), 0.4);
    transition: var(--transition-hq);
    will-change: transform;
}

.cart-trigger:hover {
    transform: scale(1.08);
}

.cart-badge {
    position: absolute;
    top: -4px; right: -4px;
    background: #000;
    color: var(--text-pure);
    font-size: 9px;
    font-weight: 800;
    width: 16px; height: 16px;
    border-radius: 50%;
    display: flex; justify-content: center; align-items: center;
    border: 1px solid var(--accent-primary);
}

/* ==========================================================================
   6. Secondary Navigation
   ========================================================================== */
.secondary-nav-container {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-top: 24px;
    z-index: 90;
    position: relative;
}

.secondary-navbar {
    background: rgba(22, 22, 26, 0.25);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    padding: 6px 12px;
    border-radius: 30px;
    display: flex;
    gap: 8px;
    transition: var(--transition-hq);
}

.secondary-navbar button {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-muted);
    padding: 8px 24px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast); /* Fast transition is smoother for quick clicks */
}

.secondary-navbar button:hover {
    color: var(--text-pure);
    background: rgba(255, 255, 255, 0.03);
}

.secondary-navbar button.active {
    background: rgba(var(--accent-primary-rgb), 0.12);
    border-color: rgba(var(--accent-primary-rgb), 0.3);
    color: var(--text-pure);
}

/* ==========================================================================
   7. Left Sidebar Controls
   ========================================================================== */
.left-sidebar-controls {
    position: fixed;
    left: 48px; top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 16px;
    z-index: 98;
}

.sidebar-btn {
    width: 54px; height: 54px;
    border-radius: 12px;
    background: var(--glass-background);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    color: var(--text-muted);
    font-size: 18px;
    cursor: pointer;
    position: relative;
    display: flex; justify-content: center; align-items: center;
    transition: var(--transition-hq);
}

.btn-glow-layer {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    border-radius: 12px;
    opacity: 0;
    box-shadow: 0 0 25px rgba(var(--accent-primary-rgb), 0.6);
    transition: var(--transition-hq);
    z-index: -1;
}

.sidebar-btn:hover .btn-glow-layer, .sidebar-btn.active .btn-glow-layer {
    opacity: 1;
}

.sidebar-btn:hover, .sidebar-btn.active {
    color: var(--text-pure);
    border-color: var(--accent-primary);
    transform: translateX(4px);
}

.sidebar-label {
    position: absolute;
    left: 70px;
    background: var(--bg-dark-gray);
    border: 1px solid var(--glass-border);
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transform: translateX(-10px);
    transition: var(--transition-hq);
}

.sidebar-btn:hover .sidebar-label {
    opacity: 1;
    transform: translateX(0);
}

/* ==========================================================================
   8. Hero Section
   ========================================================================== */
.hero-viewport {
    min-height: calc(100vh - 180px);
    width: 100%;
    display: flex;
    align-items: center;
    padding: 0 100px 0 160px;
    position: relative;
    z-index: 10;
}

.hero-container {
    width: 100%;
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    align-items: center;
    gap: 60px;
    transition: var(--transition-hq);
}

.welcome-badge {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 6px 18px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 24px;
    display: inline-block;
}

.hero-heading {
    font-size: 54px;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 24px;
}

.hero-description {
    font-size: 16px;
    line-height: 1.65;
    color: var(--text-muted);
    max-width: 540px;
    margin-bottom: 36px;
}

.btn-cta-primary {
    background: transparent;
    border: 1px solid var(--accent-primary);
    color: var(--text-pure);
    padding: 14px 32px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    overflow: hidden;
    transition: var(--transition-hq);
    will-change: transform, box-shadow;
}

.btn-cta-primary::before {
    content: '';
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: var(--accent-gradient);
    z-index: -1;
    opacity: 0;
    transition: var(--transition-hq);
}

.btn-cta-primary:hover::before { opacity: 0.15; }
.btn-cta-primary:hover {
    box-shadow: 0 0 30px rgba(var(--accent-primary-rgb), 0.4);
    transform: translateY(-2px);
}

.arrow-icon { transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1); }
.btn-cta-primary:hover .arrow-icon { transform: translateX(5px); }

.hero-right {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* ==========================================================================
   9. Bottom Dock (Switcher & Scroll Indicator)
   ========================================================================== */
.bottom-switcher-dock {
    position: fixed;
    bottom: 32px; left: 0; width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    z-index: 99;
    pointer-events: none;
}

.pill-switcher-container {
    background: var(--glass-background);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    padding: 6px;
    border-radius: 40px;
    display: flex;
    position: relative;
    box-shadow: var(--shadow-premium);
    pointer-events: auto;
}

.switcher-tab {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 10px 28px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    position: relative;
    z-index: 2;
    transition: color 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.switcher-tab.active { color: var(--text-pure); }

.switcher-slider-rail {
    position: absolute;
    top: 6px; left: 6px;
    height: calc(100% - 12px);
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 30px;
    z-index: 1;
    pointer-events: none;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform, width;
}

.scroll-indicator { display: flex; justify-content: center; }

.mouse-icon {
    width: 20px; height: 32px;
    border: 1.5px solid var(--text-dark-muted);
    border-radius: 12px;
    display: flex; justify-content: center; padding-top: 6px;
}

.mouse-wheel {
    width: 3px; height: 6px;
    background-color: var(--accent-primary);
    border-radius: 2px;
    animation: scrollWheel 1.6s infinite ease-in-out;
}

/* ==========================================================================
   10. Decorative Elements & Animations
   ========================================================================== */
.pixel-deco-left, .pixel-deco-right {
    position: fixed; bottom: 0; z-index: 1;
    pointer-events: none; opacity: 0.75;
}

.pixel-deco-left { left: 0; }
.pixel-deco-right { right: 0; }

.block-group { position: relative; width: 300px; height: 180px; }
.p-block { position: absolute; background: var(--accent-gradient); box-shadow: 0 0 30px rgba(var(--accent-primary-rgb), 0.3); }

.p-1 { bottom: 0; left: 0; width: 64px; height: 32px; }
.p-2 { bottom: 0; left: 64px; width: 48px; height: 48px; }
.p-3 { bottom: 32px; left: 0; width: 32px; height: 32px; opacity: 0.6; }
.p-4 { bottom: 0; right: 0; width: 80px; height: 48px; }
.p-5 { bottom: 0; right: 80px; width: 40px; height: 32px; }
.p-6 { bottom: 48px; right: 20px; width: 32px; height: 32px; opacity: 0.5; }

@keyframes scrollWheel {
    0% { transform: translateY(0); opacity: 1; }
    50% { transform: translateY(6px); opacity: 0.3; }
    100% { transform: translateY(0); opacity: 1; }
}

@keyframes floatingOrb {
    0%, 100% { transform: translateY(0) scale(1); filter: blur(20px); }
    50% { transform: translateY(-15px) scale(1.05); filter: blur(25px); }
}

@keyframes rotateRing { to { transform: rotate(360deg); } }

/* FIX: Added hardware acceleration for completely smooth text crossfades */
.view-intermission {
    opacity: 0 !important;
    transform: translateY(15px) scale(0.98) !important;
    filter: blur(8px);
    will-change: transform, opacity, filter;
    transition: var(--transition-hq);
}

/* ==========================================================================
   11. Media Queries (Responsive Design)
   ========================================================================== */
@media (max-width: 1200px) {
    .hero-viewport { padding: 0 64px 0 140px; }
    .hero-heading { font-size: 44px; }
}

@media (max-width: 992px) {
    .left-sidebar-controls { display: none; }
    .hero-viewport { padding: 40px; }
    .hero-container { grid-template-columns: 1fr; text-align: center; gap: 40px; }
    .hero-left { align-items: center; }
    .hero-right { order: -1; }
    .main-navbar, .main-navbar.scrolled { margin: 16px; padding: 12px 24px; }
    .top-utility-bar { padding: 16px 24px 0 24px; }
}

@media (max-width: 768px) {
    .nav-menu { 
        display: none; 
    }
    
    .nav-menu.active {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 80px; 
        left: 0;
        width: 100%;
        background: var(--bg-dark-gray);
        padding: 20px;
        border-radius: 12px;
        box-shadow: var(--shadow-premium);
        gap: 20px;
        z-index: 100;
    }

    .mobile-toggle {
        display: block; /* Show hamburger only on mobile */
    }

    .hero-heading { font-size: 36px; }
    .top-utility-bar { display: none; }
    .pill-switcher-container { transform: scale(0.9); }
}