/* Global Styles */
@font-face {
    font-family: 'Inter';
    src: url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');
}

@font-face {
    font-family: 'Space Grotesk';
    src: url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&display=swap');
}

:root {
    --text-color: #e0e6f0;
    --bg-color: #06070d;
    --primary-color: #ffffff;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --blur-strength: 12px;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
    color: var(--text-color);
    background-color: var(--bg-color);
    overflow-x: hidden;
}

/* Hero Section */
.hero {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 0 5%;
    overflow: hidden;
    box-sizing: border-box;
    background: radial-gradient(ellipse 80% 60% at 55% 50%, #0a1628 0%, #06070d 70%);
}

/* New readability overlay for text */
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 60%;
    /* Cover the left side where text is */
    height: 100%;
    background: linear-gradient(90deg, rgba(6, 7, 13, 0.9) 0%, rgba(6, 7, 13, 0.4) 70%, transparent 100%);
    z-index: 5;
    /* Behind text (z-index 20) but above canvas/nodes */
    pointer-events: none;

}

/* Subtle noise overlay */
.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
    background-repeat: repeat;
    pointer-events: none;
    z-index: 1;
    opacity: 0.4;
}

/* Canvas for particles & lines */
#heroCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

/* Mouse Glow */
.mouse-glow {
    position: fixed;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(100, 60, 255, 0.06) 0%, transparent 70%);
    pointer-events: none;
    z-index: 3;
    transform: translate(-50%, -50%);
    transition: left 0.3s ease, top 0.3s ease;
}

/* Core Animation CSS */
#coreContainer {
    position: absolute;
    top: 50%;
    left: 75%;
    /* Moved significantly right to clear text area */
    transform: translate(-50%, -50%);
    z-index: 5;
    width: 320px;
    height: 320px;
    pointer-events: none;
}

.core-ring {
    position: absolute;
    border-radius: 50%;
    border: 1.5px solid;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-timing-function: linear;
    animation-iteration-count: infinite;
}

.core-ring-1 {
    width: 120px;
    height: 120px;
    border-color: rgba(180, 130, 255, 0.5);
    box-shadow: 0 0 30px rgba(160, 100, 255, 0.25), inset 0 0 30px rgba(160, 100, 255, 0.15);
    animation: spinCore 8s linear infinite;
}

.core-ring-2 {
    width: 180px;
    height: 180px;
    border-color: rgba(0, 210, 255, 0.35);
    box-shadow: 0 0 25px rgba(0, 200, 255, 0.15), inset 0 0 25px rgba(0, 200, 255, 0.1);
    animation: spinCore 12s linear infinite reverse;
}

.core-ring-3 {
    width: 240px;
    height: 240px;
    border-color: rgba(180, 130, 255, 0.2);
    box-shadow: 0 0 20px rgba(160, 100, 255, 0.1);
    animation: spinCore 18s linear infinite;
}

.core-ring-4 {
    width: 300px;
    height: 300px;
    border-color: rgba(0, 210, 255, 0.12);
    box-shadow: 0 0 15px rgba(0, 200, 255, 0.06);
    animation: spinCore 24s linear infinite reverse;
}

.core-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(220, 200, 255, 0.95) 0%, rgba(160, 100, 255, 0.7) 30%, rgba(80, 40, 200, 0.3) 60%, transparent 80%);
    box-shadow:
        0 0 40px rgba(160, 100, 255, 0.6),
        0 0 80px rgba(120, 60, 255, 0.4),
        0 0 120px rgba(100, 40, 255, 0.25),
        0 0 200px rgba(80, 30, 255, 0.15);
    animation: coreBreath 3s ease-in-out infinite;
}

.core-center::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: radial-gradient(circle, #fff 0%, rgba(200, 180, 255, 0.8) 50%, transparent 70%);
    animation: coreBreath 3s ease-in-out infinite 0.5s;
}

@keyframes spinCore {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

@keyframes coreBreath {

    0%,
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }

    50% {
        transform: translate(-50%, -50%) scale(1.15);
        opacity: 0.85;
    }
}

/* Floating Nodes */
.floating-node {
    position: absolute;
    z-index: 8;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    pointer-events: auto;
    cursor: pointer;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    opacity: 0;
    animation: nodeAppear 0.8s ease forwards;
}

.floating-node:hover {
    transform: scale(1.12) translateY(-4px);
}

.floating-node:hover .node-icon {
    box-shadow:
        0 0 25px rgba(0, 210, 255, 0.5),
        0 0 50px rgba(0, 210, 255, 0.2),
        inset 0 0 20px rgba(255, 255, 255, 0.1);
    border-color: rgba(0, 210, 255, 0.6);
}

.node-icon {
    width: 58px;
    height: 58px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.02) 100%);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow:
        0 4px 20px rgba(0, 0, 0, 0.3),
        0 0 15px rgba(100, 60, 255, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.node-icon::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(135deg, transparent 40%, rgba(255, 255, 255, 0.06) 50%, transparent 60%);
    animation: glassShine 4s ease-in-out infinite;
}

.node-icon svg {
    width: 28px;
    height: 28px;
    position: relative;
    z-index: 2;
}

.node-label {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.5px;
    color: rgba(200, 210, 230, 0.75);
    white-space: nowrap;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    transition: color 0.3s ease;
}

.floating-node:hover .node-label {
    color: rgba(0, 220, 255, 0.95);
}

@keyframes glassShine {

    0%,
    100% {
        transform: rotate(0deg) translateX(-100%);
    }

    50% {
        transform: rotate(0deg) translateX(100%);
    }
}

@keyframes nodeAppear {
    0% {
        opacity: 0;
        transform: scale(0.5) translateY(20px);
    }

    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Node positions - Shifted Right */
.node-web-dev {
    top: 20%;
    left: 45%;
    animation-delay: 0.3s;
}

.node-digital-mkt {
    top: 55%;
    left: 42%;
    animation-delay: 0.5s;
}

.node-branding {
    top: 78%;
    left: 50%;
    animation-delay: 0.7s;
}

.node-graphic {
    top: 68%;
    left: 65%;
    animation-delay: 0.9s;
}

.node-automation {
    top: 72%;
    left: 75%;
    animation-delay: 1.1s;
}

.node-ecology {
    top: 28%;
    left: 82%;
    animation-delay: 1.3s;
}

.node-unified {
    top: 48%;
    left: 88%;
    animation-delay: 1.5s;
}

.node-prism {
    top: 15%;
    left: 65%;
    animation-delay: 0.4s;
}

/* Individual node float animations */
.floating-node:nth-child(odd) {
    animation: nodeAppear 0.8s ease forwards, nodeFloat1 6s ease-in-out infinite 2s;
}

.floating-node:nth-child(even) {
    animation: nodeAppear 0.8s ease forwards, nodeFloat2 7s ease-in-out infinite 2s;
}

@keyframes nodeFloat1 {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
    }
}

@keyframes nodeFloat2 {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(6px);
    }
}


/* Existing UI Elements - Adjusted for Dark Mode */

/* Navigation */
.nav-container {
    position: absolute;
    top: 40px;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 5%;
    box-sizing: border-box;
    z-index: 20;
    /* Boosted z-index */
}

.logo {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 1px;
    opacity: 0;
    transform: translateY(-20px);
}

.nav-links {
    display: flex;
    gap: 30px;
    background: var(--glass-bg);
    padding: 12px 30px;
    border-radius: 50px;
    backdrop-filter: blur(var(--blur-strength));
    border: 1px solid var(--glass-border);
    opacity: 0;
    transform: translateY(-20px);
}

.nav-links a {
    text-decoration: none;
    color: var(--text-color);
    font-size: 14px;
    font-weight: 500;
    transition: opacity 0.3s ease;
}

.nav-links a:hover {
    opacity: 0.7;
}

.cta-button-nav {
    background: var(--primary-color);
    color: #000;
    padding: 10px 24px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    opacity: 0;
    transform: translateY(-20px);
    transition: transform 0.3s ease, background 0.3s ease;
}

.cta-button-nav:hover {
    transform: translateY(-22px) scale(1.05);
    background: #f0f0f0;
}

/* Hero Content */
.hero-content {
    max-width: 800px;
    margin-top: 60px;
    z-index: 20;
    /* Boosted z-index */
    position: relative;
}

h1 {
    font-size: 64px;
    line-height: 1.1;
    font-weight: 600;
    margin-bottom: 24px;
    letter-spacing: -1px;
    opacity: 0;
    transform: translateY(30px);
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.8);
    /* Stronger shadow */
    max-width: 90%;
}

.subtext {
    font-size: 18px;
    line-height: 1.6;
    margin-bottom: 40px;
    max-width: 600px;
    opacity: 0;
    transform: translateY(30px);
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.8);
    /* Stronger shadow */
    color: rgba(255, 255, 255, 0.9);
}

.btn-group {
    display: flex;
    gap: 20px;
    opacity: 0;
    transform: translateY(30px);
}

.primary-btn {
    background: var(--primary-color);
    color: #000;
    padding: 14px 32px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.3);
}

.secondary-btn {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(var(--blur-strength));
    color: var(--text-color);
    padding: 14px 32px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
}

.secondary-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* Floating Stats Card */
.stats-card {
    position: absolute;
    bottom: 15%;
    right: 5%;
    background: rgba(255, 255, 255, 0.03);
    /* More transparent for new bg */
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    padding: 24px 32px;
    border-radius: 20px;
    min-width: 250px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    opacity: 0;
    transform: translateX(30px);
    z-index: 20;
    /* Boosted z-index */
}

.stats-number {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 8px;
    display: block;
}

.stats-label {
    font-size: 14px;
    opacity: 0.8;
    font-weight: 400;
}

/* Scroll Hint */
.scroll-hint {
    position: absolute;
    bottom: 40px;
    right: 5%;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    opacity: 0;
    z-index: 20;
    /* Boosted z-index */
}

.scroll-text {
    opacity: 0.8;
}

.scroll-arrow {
    display: inline-block;
    font-size: 16px;
    animation: bounce 2s infinite;
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-5px);
    }

    60% {
        transform: translateY(-3px);
    }
}

/* Re-adjust responsive */
@media (max-width: 1200px) {

    /* Large tablets / Small laptops */
    #coreContainer {
        left: 80%;
        transform: translate(-50%, -50%) scale(0.8);
    }

    .hero-content {
        max-width: 60%;
    }

    .floating-node {
        transform: scale(0.8);
    }
}

@media (max-width: 1024px) {

    /* Tablets */
    h1 {
        font-size: 48px;
    }

    .hero-content {
        max-width: 70%;
        padding-right: 5%;
    }

    #coreContainer {
        left: 85%;
        opacity: 0.4;
    }

    .floating-node {
        display: none;
    }

    /* Hide nodes earlier to prevent clutter */
}

/* Mobile Navigation & Responsive Styles */
.mobile-menu-container {
    display: none;
}

.mobile-nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(5, 5, 10, 0.98);
    /* Less transparent for focus */
    backdrop-filter: blur(15px);
    z-index: 200;
    /* Above everything */
    display: flex;
    flex-direction: column;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    padding: 20px;
    box-sizing: border-box;
}

.mobile-nav-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.mobile-nav-header {
    width: 100%;
    display: flex;
    justify-content: flex-start;
    padding-bottom: 40px;
}

.mobile-back-btn {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 16px;
    font-weight: 500;
    display: flex;
    align-items: center;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    opacity: 0;
    transform: translateX(-20px);
    transition: all 0.3s ease 0.1s;
}

.mobile-nav-overlay.active .mobile-back-btn {
    opacity: 0.8;
    transform: translateX(0);
}

.mobile-nav-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 32px;
    margin-top: 20px;
}

.mobile-link {
    font-size: 28px;
    font-weight: 600;
    color: #fff;
    text-decoration: none;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    letter-spacing: -0.5px;
}

.mobile-cta-btn {
    margin-top: 30px;
    padding: 16px 40px;
    background: #fff;
    color: #000;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    font-size: 16px;
    opacity: 0;
    transform: translateY(20px);
    width: 100%;
    text-align: center;
    max-width: 300px;
}

/* Stagger animation classes handled by JS usually, but simple CSS transition delay here */
.mobile-nav-overlay.active .mobile-link,
.mobile-nav-overlay.active .mobile-cta-btn {
    opacity: 1;
    transform: translateY(0);
}

.mobile-nav-overlay.active .mobile-link:nth-child(1) {
    transition-delay: 0.1s;
}

.mobile-nav-overlay.active .mobile-link:nth-child(2) {
    transition-delay: 0.2s;
}

.mobile-nav-overlay.active .mobile-link:nth-child(3) {
    transition-delay: 0.3s;
}

.mobile-nav-overlay.active .mobile-link:nth-child(4) {
    transition-delay: 0.4s;
}

.mobile-nav-overlay.active .mobile-link:nth-child(5) {
    transition-delay: 0.5s;
}

.mobile-nav-overlay.active .mobile-cta-btn {
    transition-delay: 0.6s;
}


@media (max-width: 768px) {

    /* Mobile Header Layout */
    .nav-container {
        justify-content: space-between;
        /* Space out Logo and Hamburger */
        padding: 0 24px;
        /* More padding on sides */
        top: 20px;
        align-items: center;
    }

    .logo {
        transform: translateY(0);
        margin-bottom: 0;
        text-align: left;
        /* Ensure text aligns left */
        opacity: 1 !important;
        /* Force visible immediately */
        z-index: 101;
        /* Above overlay so it's visible when menu open */
        position: relative;
    }

    /* Hide Desktop Elements */
    .desktop-only,
    .nav-links {
        display: none !important;
    }

    /* Show Mobile Menu Button */
    .mobile-menu-container {
        display: block;
        z-index: 101;
        /* Above overlay */
    }

    .mobile-menu-btn {
        width: 40px;
        height: 40px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: flex-end;
        gap: 6px;
        cursor: pointer;
    }

    .bar {
        width: 30px;
        height: 2px;
        background-color: #fff;
        transition: all 0.3s ease;
    }

    /* Hamburger Animation to X regarding 3 bars */
    .mobile-menu-container.active .bar:nth-child(1) {
        transform: rotate(45deg) translate(5px, 6px);
    }

    .mobile-menu-container.active .bar:nth-child(2) {
        opacity: 0;
        transform: translateX(-10px);
    }

    .mobile-menu-container.active .bar:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -6px);
    }

    /* Hero Content Mobile Adjustments */
    .hero {
        padding: 0 24px;
        align-items: center;
        text-align: center;
    }

    .hero-content {
        margin-top: 100px;
        /* More space for header */
        max-width: 100%;
        padding-right: 0;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    h1 {
        font-size: 32px;
        line-height: 1.2;
        text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
    }

    .subtext {
        font-size: 16px;
        margin-bottom: 30px;
    }

    .btn-group {
        flex-direction: column;
        width: 100%;
        gap: 15px;
        align-items: center;
    }

    .primary-btn,
    .secondary-btn {
        width: calc(100% - 40px);
        margin-inline: 20px;
        max-width: 100%;
        /* Full width buttons looks better on mobile */
        justify-content: center;
    }

    .stats-card {
        position: relative;
        bottom: auto;
        right: auto;
        margin-top: 50px;
        width: 100%;
        max-width: 100%;
        transform: translateY(0);
        background: rgba(20, 20, 30, 0.6);
        box-sizing: border-box;
    }

    /* Hide background elements for performance and clarity */
    #coreContainer {
        top: 40%;
        left: 50%;
        opacity: 0.15;
        transform: translate(-50%, -50%) scale(0.6);
    }
}