/* Google Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
    /* Colors */
    --bg-dark: #050508;
    --bg-card: #0F0F16;
    --text-main: #FFFFFF;
    --text-muted: #9CA3AF;
    --primary: #3B82F6;
    --primary-glow: rgba(59, 130, 246, 0.5);
    --secondary: #8B5CF6;
    /* AI Purple */
    --accent: #06B6D4;
    /* Cyan */
    --gradient-main: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);

    /* Spacing */
    --container-padding: 2rem;
    --max-width: 1200px;

    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
}

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

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

ul {
    list-style: none;
}

/* Utilities */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.btn-primary {
    background: var(--gradient-main);
    color: white;
    box-shadow: 0 4px 15px var(--primary-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--primary-glow);
}

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

.btn-outline:hover {
    background: rgba(59, 130, 246, 0.1);
}

.gradient-text {
    background: var(--gradient-main);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(5, 5, 8, 0.9);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

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

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    padding-left: 20px;
}

.nav-menu {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    font-weight: 500;
    color: var(--text-muted);
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-main);
}

.nav-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Mobile Nav */
@media (max-width: 768px) {
    .nav-toggle {
        display: block;
        padding-right: 20px;
    }

    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: var(--bg-dark);
        flex-direction: column;
        padding: 2rem;
        transition: 0.3s ease;
    }

    .nav-menu.active {
        left: 0;
    }
}

/* Hero Section */
.hero {
    padding: 8rem 0 4rem;
    min-height: 90vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -20%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--primary-glow) 0%, transparent 70%);
    opacity: 0.4;
    z-index: -1;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-content {
    max-width: 100%;
}

.hero-image-container {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

/* Neural Nexus 3D Animation */
.neural-wrapper {
    position: relative;
    width: 300px;
    height: 300px;
    transform-style: preserve-3d;
    animation: rotate-sphere 20s linear infinite;
}

.neural-core {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120px;
    height: 120px;
    border-radius: 50%;
    /* Cyberpunk Core: Cyan inner, Purple glow */
    background: radial-gradient(circle, rgba(0, 243, 255, 0.8) 0%, rgba(188, 19, 254, 0.3) 70%, transparent 100%);
    box-shadow: 0 0 60px rgba(0, 243, 255, 0.5), 0 0 30px rgba(188, 19, 254, 0.3);
    filter: blur(5px);
}

/* Network Node - Absorbing Animation */
.network-node {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    /* Start VISIBLE */
    opacity: 1;
    transform: translate3d(var(--x), var(--y), var(--z));
    box-shadow: 0 0 10px currentColor;
    /* Glows with its own color */
    will-change: transform, opacity;
    /* Respawn Fade: When class is removed, fade opacity back in smoothly */
    transition: opacity 1.5s ease-out;
}

/* Network Line - Absorbing Animation */
.network-line {
    position: absolute;
    top: 50%;
    left: 50%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0, 243, 255, 0.5), transparent);
    transform-origin: center left;
    transform: rotateX(var(--rx)) rotateY(var(--ry)) translateZ(var(--rz));
    opacity: 1;
    /* Start VISIBLE */
    will-change: transform, opacity;
    /* Respawn Fade */
    transition: opacity 1.5s ease-out;
}

/* The Active Animation Class (Added by JS) */
.active-absorb {
    /* Override transition for the "Disappear" phase - make it happen via animation */
    transition: none;
    animation: absorb-to-center 1.2s cubic-bezier(0.55, 0.055, 0.675, 0.19) forwards;
}

@keyframes absorb-to-center {
    0% {
        transform: translate3d(var(--x), var(--y), var(--z)) scale(1);
        opacity: 1;
    }

    100% {
        /* Maintain scale to avoid "pulsing" look, just fade out */
        transform: translate3d(0, 0, 0) scale(0.8);
        opacity: 0;
    }
}

/* Lines use a slightly different transform logic but same concept */
.network-line.active-absorb {
    animation: absorb-line-center 1.2s cubic-bezier(0.55, 0.055, 0.675, 0.19) forwards;
}

@keyframes absorb-line-center {
    0% {
        transform: rotateX(var(--rx)) rotateY(var(--ry)) translateZ(var(--rz)) scaleX(1);
        opacity: 1;
    }

    100% {
        transform: rotateX(var(--rx)) rotateY(var(--ry)) translateZ(0px) scaleX(0.1);
        opacity: 0;
    }
}

@keyframes rotate-sphere {
    0% {
        transform: rotateY(0deg) rotateX(20deg);
    }

    100% {
        transform: rotateY(360deg) rotateX(20deg);
    }
}

@media (max-width: 968px) {
    .neural-wrapper {
        transform: scale(0.8);
    }
}

@media (max-width: 968px) {
    .neural-wrapper {
        transform: scale(0.8);
    }
}

@media (max-width: 968px) {
    .hero .container {
        /* Remove grid, use flex for ordering */
        display: flex;
        flex-direction: column;
        grid-template-columns: unset;
        /* Override grid */
        text-align: center;
        gap: 3rem;
    }

    .hero-content {
        display: flex;
        flex-direction: column-reverse;
        /* Image (2nd child) goes to top */
        gap: 2rem;
        margin: 0 auto;
    }

    .hero p {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-content div[style*="display: flex"] {
        justify-content: center;
    }
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    max-width: 600px;
}

/* Services Grid */
.services-section {
    padding: 6rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.service-card {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.service-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
}

.service-icon {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: var(--primary);
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.service-card p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.feature-list {
    margin: 1.5rem 0;
}

.feature-list li {
    margin-bottom: 0.5rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.feature-list li::before {
    content: '✓';
    color: var(--accent);
}

/* Footer */
footer {
    padding: 4rem 0 2rem;
    background: var(--bg-card);
    margin-top: 6rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-col h4 {
    margin-bottom: 1.5rem;
    color: var(--text-main);
}

.footer-col a {
    display: block;
    margin-bottom: 0.75rem;
    color: var(--text-muted);
}

.footer-col a:hover {
    color: var(--primary);
}

.copyright {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Simple Animation Classes */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Pricing Tables */
.pricing-grid {
    align-items: flex-start;
}

.pricing-card {
    text-align: center;
    position: relative;
    padding: 2.5rem 2rem;
}

.pricing-card.popular {
    border-color: var(--primary);
    box-shadow: 0 0 30px rgba(59, 130, 246, 0.15);
    transform: scale(1.05);
    z-index: 2;
}

.pricing-card.popular:hover {
    transform: scale(1.05) translateY(-5px);
}

.popular-tag {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--gradient-main);
    padding: 0.25rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.pricing-header {
    margin-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 2rem;
}

.price {
    font-size: 3rem;
    font-weight: 700;
    color: var(--text-main);
    margin: 1rem 0;
}

.price span {
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: 400;
}

.pricing-features {
    text-align: left;
    margin-bottom: 2rem;
}

.pricing-features li {
    margin-bottom: 0.75rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
}

.pricing-features li::before {
    content: '✓';
    color: var(--secondary);
    font-weight: bold;
}

.pricing-card .btn {
    width: 100%;
}

