/* =========================================
   Reset & Base Styles
   ========================================= */
:root {
    --bg-color: #020518;
    --text-primary: #ffffff;
    --text-secondary: #b0c4de;
    --accent-blue: #0066ff;
    --highlight-blue: #5c8aff;
    --card-bg: rgba(10, 20, 50, 0.4);
    --card-border: rgba(60, 100, 180, 0.3);
    --font-main: 'Inter', sans-serif;
}

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

body {
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.5;
    overflow-x: hidden;
    min-height: 100vh;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* =========================================
   Header
   ========================================= */
.site-header {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1.5rem 0;
    z-index: 1000;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-text {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.1;
    display: block;
    letter-spacing: -0.5px;
}

.nav-list {
    display: flex;
    gap: 2.5rem;
}

.nav-item {
    position: relative;
}

.nav-link {
    color: #e0e0e0;
    font-size: 0.95rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: color 0.2s ease;
    padding: 0.5rem 0;
    cursor: pointer;
}

.nav-link:hover {
    color: var(--text-primary);
}

.arrow {
    font-size: 0.75rem;
    margin-top: 0;
    transition: transform 0.2s;
    line-height: 1;
}

.nav-item:hover .arrow {
    transform: rotate(180deg);
}

/* Dropdown Menus */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: white;
    color: #333;
    border-radius: 8px;
    padding: 1rem;
    min-width: 200px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    z-index: 1001;
}

.nav-item:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.dropdown-menu .menu-items li {
    margin-bottom: 0.5rem;
}

.dropdown-menu .menu-items li:last-child {
    margin-bottom: 0;
}

.dropdown-menu .menu-items a {
    display: block;
    padding: 0.5rem;
    border-radius: 4px;
    color: #333;
    font-size: 0.9rem;
    transition: background 0.2s;
}

.dropdown-menu .menu-items a:hover {
    background: #f5f5f5;
    color: var(--accent-blue);
}

/* Mega Menu for Solutions */
.mega-menu {
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    width: 90vw;
    max-width: 1200px;
    padding: 2rem;
    position: fixed; /* Fixed relative to viewport to center properly */
    top: 80px; /* Adjust based on header height */
}

.nav-item:hover .mega-menu {
    transform: translateX(-50%) translateY(0);
}

.mega-menu-content {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 2rem;
}

.menu-column {
    display: flex;
    flex-direction: column;
}

.menu-header {
    font-size: 0.75rem;
    font-weight: 700;
    color: #888;
    text-transform: uppercase;
    margin-bottom: 1rem;
    letter-spacing: 0.5px;
}

.mt-4 {
    margin-top: 1.5rem;
}

.auth-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.6rem 1.2rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    gap: 6px;
}

.btn-text {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid transparent;
}

.btn-text:hover {
    background: rgba(255, 255, 255, 0.1);
}

.btn-primary {
    background-color: var(--accent-blue);
    color: white;
    border: 1px solid var(--accent-blue);
}

.btn-primary:hover {
    background-color: #0052cc;
    border-color: #0052cc;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 6px;
}

.mobile-menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background-color: white;
    transition: 0.3s;
}

/* =========================================
   Hero Section
   ========================================= */
.hero-section {
    padding-top: 8rem;
    padding-bottom: 4rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: radial-gradient(circle at center, #0a1033 0%, #020518 70%);
}

.hero-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.hero-text {
    text-align: center;
    margin-bottom: 3rem;
    max-width: 900px;
}

.headline {
    font-size: 3rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    line-height: 1.2;
    letter-spacing: -1px;
}

.text-highlight {
    color: var(--highlight-blue);
}

.subheadline {
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: 400;
    line-height: 1.6;
}

/* =========================================
   Ecosystem Container
   ========================================= */
.ecosystem-container {
    position: relative;
    width: 100%;
    max-width: 1200px;
    height: 600px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* SVG Lines */
.connection-lines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.line-path {
    fill: none;
    stroke: rgba(60, 100, 180, 0.4);
    stroke-width: 1.5;
}

.line-dot {
    fill: #4d8eff;
    filter: drop-shadow(0 0 4px #4d8eff);
}


/* Center Piece */
.center-piece {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200px;
    height: 200px;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 5;
}


/* 3D Glass Sphere Construction */
.sphere {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    position: relative;
    z-index: 2;
    
    /* Glass Base */
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 20%, rgba(255, 255, 255, 0.01) 100%);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    
    /* Complex Shadowing for 3D Volume */
    box-shadow: 
        inset -10px -10px 20px rgba(0,0,0,0.5), /* Deep shadow bottom-right */
        inset 5px 5px 15px rgba(255, 255, 255, 0.2), /* Ambient light top-left */
        inset -2px -2px 6px rgba(255, 255, 255, 0.3), /* Rim light */
        0 0 30px rgba(0, 102, 255, 0.4), /* Outer glow */
        0 15px 35px rgba(0,0,0,0.5); /* Drop shadow */
        
    overflow: hidden;
    transform-style: preserve-3d;
}

/* Rotating Texture Layer (Caustics) - Marble Effect */
.sphere::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    
    /* Marble Effect Gradient */
    background: conic-gradient(
        from 180deg,
        #020518 0deg,      /* Dark base */
        #0066ff 60deg,     /* Blue */
        #00ffff 100deg,    /* Cyan */
        #ffffff 120deg,    /* White highlight */
        #800080 160deg,    /* Purple */
        #ff00ff 200deg,    /* Pink/Magenta */
        #0066ff 260deg,    /* Blue */
        #020518 360deg     /* Dark base loop */
    );
    
    /* Randomised Rotation Animation */
    animation: sphere-wander 15s ease-in-out infinite alternate;
    filter: blur(15px);
    opacity: 0.9;
    border-radius: 40%;
}

/* Specular Highlight (The "Glint") */
.sphere::after {
    content: '';
    position: absolute;
    top: 15%;
    left: 18%;
    width: 25%;
    height: 15%;
    border-radius: 50%;
    background: radial-gradient(ellipse at center, rgba(255,255,255,0.95) 0%, rgba(255,255,255,0) 70%);
    filter: blur(3px);
    transform: rotate(-45deg);
    z-index: 3;
    pointer-events: none;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.6);
}

@keyframes sphere-wander {
    0% { transform: rotate3d(1, 1, 1, 0deg) scale(1.2); }
    25% { transform: rotate3d(2, -1, 0, 45deg) scale(1.3); }
    50% { transform: rotate3d(-1, 2, 1, 90deg) scale(1.2); }
    75% { transform: rotate3d(0, 1, -2, 135deg) scale(1.3); }
    100% { transform: rotate3d(1, 1, 1, 180deg) scale(1.2); }
}

.sphere-glow {
    position: absolute;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(0, 80, 255, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 1;
    pointer-events: none;
}

/* =========================================
   Product Cards - Absolute Positioning
   ========================================= */
.product-card {
    position: absolute;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    width: 260px;
    height: 90px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    z-index: 10;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.product-card:hover {
    transform: scale(1.02);
    border-color: var(--accent-blue);
    background: rgba(15, 25, 60, 0.8);
    z-index: 11;
}

/* Specific Positions (Based on 1200x600 container) */
/* Center is 600, 300 */

/* Left Top: Research */
.card-research {
    top: 75px;
    left: 50px;
}

/* Left Middle: API */
.card-api {
    top: 255px;
    left: -50px; /* Further out left */
}

/* Left Bottom: Connect */
.card-connect {
    top: 435px;
    left: 50px;
}

/* Right Top: Markets */
.card-markets {
    top: 75px;
    right: 50px;
}

/* Right Middle: AskPc */
.card-askpc {
    top: 255px;
    right: -50px; /* Further out right */
}

/* Right Bottom: Networks */
.card-networks {
    top: 435px;
    right: 50px;
}


/* Card Content Styling */
.card-content {
    flex: 1;
}

.card-title {
    font-size: 0.75rem;
    letter-spacing: 1.5px;
    color: #4d8eff;
    margin-bottom: 0.35rem;
    text-transform: uppercase;
    font-weight: 700;
}

.card-desc {
    font-size:12px;
    font-weight: 200;
    color: var(--text-secondary);
    line-height: 1.3;
}

/* Icons */
.card-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

.card-icon-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* =========================================
   Responsive Design
   ========================================= */
@media (max-width: 1024px) {
    .ecosystem-container {
        height: auto;
        flex-direction: column;
        gap: 2rem;
        padding: 2rem 0;
    }

    .connection-lines {
        display: none;
    }

    .center-piece {
        position: relative;
        top: auto;
        left: auto;
        transform: none;
        margin-bottom: 2rem;
        order: -1; /* Sphere on top */
    }

    .product-card {
        position: relative;
        top: auto !important;
        left: auto !important;
        right: auto !important;
        width: 100%;
        max-width: 350px;
    }
}

@media (max-width: 768px) {
    .headline {
        font-size: 2.5rem;
    }

    .main-nav, .auth-actions {
        display: none;
    }

    .mobile-menu-toggle {
        display: flex;
    }
    
    .mobile-menu-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
    .mobile-menu-toggle.active span:nth-child(2) { opacity: 0; }
    .mobile-menu-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(7px, -6px); }

    .main-nav.active {
        display: flex;
        position: absolute;
        top: 70px;
        left: 0;
        width: 100%;
        background-color: var(--bg-color);
        padding: 2rem;
        flex-direction: column;
        border-bottom: 1px solid #333;
        z-index: 2000;
    }
    
    .nav-list {
        flex-direction: column;
        align-items: center;
        gap: 1.5rem;
    }

    .auth-actions.active {
        display: flex;
        position: absolute;
        top: 250px;
        left: 0;
        width: 100%;
        justify-content: center;
        padding-bottom: 2rem;
        background-color: var(--bg-color);
        z-index: 2000;
    }
}
