:root {
    --bg-dark: #030712;
    --text-primary: #f9fafb;
    --text-secondary: #9ca3af;
    --accent-primary: #6366f1;
    /* Indigo */
    --accent-secondary: #a855f7;
    /* Purple */
    --accent-glow: rgba(99, 102, 241, 0.15);
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --font-heading: 'Space Grotesk', sans-serif;
    --font-body: 'Outfit', sans-serif;
    --radius: 16px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* Background Effects */
.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.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.05'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: -1;
}

/* Sci-fi Grid Background */
.grid-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: -3;
    perspective: 500px;
    transform: translateY(0);
    /* mask to fade out at edges */
    -webkit-mask-image: radial-gradient(circle at center, black 40%, transparent 100%);
    mask-image: radial-gradient(circle at center, black 40%, transparent 100%);
}

.gradient-sphere {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    z-index: -2;
    opacity: 0.4;
    animation: float 20s infinite ease-in-out;
}

.sphere-1 {
    width: 500px;
    height: 500px;
    background: var(--accent-primary);
    top: -100px;
    left: -100px;
}

.sphere-2 {
    width: 600px;
    height: 600px;
    background: var(--accent-secondary);
    bottom: -100px;
    right: -100px;
    animation-delay: -10s;
}

/* Typography */
h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    color: #fff;
}

h1 {
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    background: linear-gradient(to right, #fff, #9ca3af);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.text-accent {
    color: var(--accent-primary);
}

/* Navigation */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 5%;
    background: rgba(3, 7, 18, 0.8);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--glass-border);
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: translateY(-2px);
}

.logo-icon {
    filter: drop-shadow(0 0 8px rgba(99, 102, 241, 0.4));
    transition: all 0.3s ease;
}

.logo:hover .logo-icon {
    filter: drop-shadow(0 0 15px rgba(99, 102, 241, 0.8));
    transform: rotate(90deg);
}

.logo-text {
    background: linear-gradient(135deg, #fff 0%, #f9fafb 50%, #d1d5db 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.02em;
}

.brand-icon {
    width: 32px;
    height: 32px;
    color: var(--accent-primary);
    filter: drop-shadow(0 0 8px var(--accent-glow));
    transition: transform 0.3s ease;
}

.logo:hover .brand-icon {
    transform: translateY(-2px);
    color: #fff;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: #fff;
}

/* Buttons */
.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.cta-button.primary {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
}

.cta-button.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(99, 102, 241, 0.6);
}

.cta-button.secondary {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: #fff;
}

.cta-button.secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}

.cta-button.small {
    padding: 0.5rem 1.2rem;
    font-size: 0.9rem;
    border: 1px solid var(--accent-primary);
    color: var(--accent-primary);
}

.cta-button.small:hover {
    background: var(--accent-primary);
    color: #fff;
}

/* Hero Section */
.hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4rem 5%;
    min-height: 80vh;
}

.hero-content {
    flex: 1;
    max-width: 600px;
    z-index: 2;
}

.badge {
    display: inline-block;
    padding: 0.4rem 1rem;
    background: rgba(99, 102, 241, 0.2);
    border: 1px solid rgba(99, 102, 241, 0.4);
    border-radius: 20px;
    color: #a5b4fc;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    max-width: 90%;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
}

.hero-visual {
    flex: 1;
    position: relative;
    height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    perspective: 1000px;
    z-index: 1;
}

/* Cyber Core Animation */
/* Holographic Interface Animation */
.holo-container {
    position: relative;
    width: 400px;
    height: 400px;
    display: flex;
    justify-content: center;
    align-items: center;
    perspective: 1200px;
    transform-style: preserve-3d;
}

/* Central 3D Logo */
.logo-3d-wrapper {
    position: relative;
    width: 140px;
    height: 140px;
    transform-style: preserve-3d;
    animation: logoFloat 6s ease-in-out infinite;
    z-index: 10;
}

.logo-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* No perspective on SVG itself, parent handles it. */
}

.logo-layer svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 0 5px rgba(99, 102, 241, 0.5));
}

.layer-1 {
    transform: translateZ(-20px) scale(0.9);
    opacity: 0.6;
    animation: layerRotate1 10s linear infinite;
}

.layer-2 {
    transform: translateZ(0);
    z-index: 2;
    animation: layerRotate1 10s linear infinite;
    /* Synced rotation */
}

.layer-3 {
    transform: translateZ(20px) scale(1.1);
    opacity: 0.8;
    animation: layerRotate1 10s linear infinite;
}

.logo-glow-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.9) 0%, var(--accent-primary) 50%, transparent 80%);
    border-radius: 50%;
    filter: blur(15px);
    opacity: 0.6;
    animation: pulseCore 3s infinite ease-in-out;
}

@keyframes logoFloat {

    0%,
    100% {
        transform: translateY(0) rotateX(10deg) rotateY(0deg);
    }

    50% {
        transform: translateY(-15px) rotateX(15deg) rotateY(10deg);
    }
}

@keyframes layerRotate1 {

    /* Slight continuous rotation to show depth */
    0% {
        transform: rotateY(0deg) translateZ(var(--z-start, 0));
    }

    100% {
        transform: rotateY(360deg) translateZ(var(--z-start, 0));
    }
}

/* Orbital Rings */
.orbit-system {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    transform-style: preserve-3d;
}

.orbit-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    border-radius: 50%;
    border: 1px solid rgba(99, 102, 241, 0.3);
    transform: translate(-50%, -50%);
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.1);
    transform-style: preserve-3d;
}

.ring-1 {
    width: 200px;
    height: 200px;
    border: 1px dashed rgba(168, 85, 247, 0.4);
    animation: orbitRotate1 12s linear infinite;
}

.ring-2 {
    width: 300px;
    height: 300px;
    border-left-color: transparent;
    border-right-color: transparent;
    border-width: 2px;
    animation: orbitRotate2 20s linear infinite reverse;
}

.ring-3 {
    width: 380px;
    height: 380px;
    border: 1px dotted rgba(236, 72, 153, 0.3);
    animation: orbitRotate1 30s linear infinite;
}

/* Holographic Platform (Base) */
.holo-platform {
    position: absolute;
    bottom: -60px;
    width: 250px;
    height: 250px;
    background: radial-gradient(ellipse at center, rgba(99, 102, 241, 0.2) 0%, transparent 70%);
    transform: rotateX(70deg);
    border-radius: 50%;
    animation: platformSearch 5s ease-in-out infinite alternate;
}

/* Floating Data Nodes */
.floating-node {
    position: absolute;
    padding: 8px 16px;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid var(--accent-primary);
    border-radius: 20px;
    font-size: 0.8rem;
    color: #fff;
    font-weight: 600;
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.3);
    backdrop-filter: blur(4px);
    z-index: 5;
    animation: nodeFloat 6s ease-in-out infinite;
}

/* Node Connectors (Pseudo-elements) */
.floating-node::before {
    content: '';
    position: absolute;
    width: 100px;
    height: 1px;
    background: linear-gradient(90deg, var(--accent-primary), transparent);
    top: 50%;
    z-index: -1;
    opacity: 0.5;
}

.node-1 {
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.node-1::before {
    left: 100%;
    width: 60px;
    transform: rotate(20deg);
    transform-origin: left center;
}

.node-2 {
    bottom: 25%;
    right: 5%;
    animation-delay: 2s;
    border-color: var(--accent-secondary);
}

.node-2::before {
    right: 100%;
    width: 80px;
    transform: rotate(-15deg);
    transform-origin: right center;
    background: linear-gradient(270deg, var(--accent-secondary), transparent);
}

.node-3 {
    top: 15%;
    right: 15%;
    animation-delay: 1s;
    border-color: #ec4899;
}

.node-3::before {
    right: 100%;
    width: 50px;
    transform: rotate(45deg);
    transform-origin: right center;
    background: linear-gradient(270deg, #ec4899, transparent);
}


/* Animations Keyframes */
@keyframes corePulse {

    0%,
    100% {
        transform: scale(1);
        box-shadow: 0 0 60px rgba(99, 102, 241, 0.6);
    }

    50% {
        transform: scale(1.05);
        box-shadow: 0 0 90px rgba(168, 85, 247, 0.8);
    }
}

@keyframes synapseWave {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.8;
    }

    100% {
        transform: translate(-50%, -50%) scale(2.5);
        opacity: 0;
    }
}

@keyframes orbitRotate1 {
    0% {
        transform: translate(-50%, -50%) rotateX(60deg) rotateZ(0deg);
    }

    100% {
        transform: translate(-50%, -50%) rotateX(60deg) rotateZ(360deg);
    }
}

@keyframes orbitRotate2 {
    0% {
        transform: translate(-50%, -50%) rotateX(70deg) rotateZ(0deg);
    }

    100% {
        transform: translate(-50%, -50%) rotateX(70deg) rotateZ(360deg);
    }
}

@keyframes platformSearch {
    0% {
        transform: rotateX(75deg) scale(1);
        opacity: 0.5;
    }

    100% {
        transform: rotateX(75deg) scale(1.1);
        opacity: 0.2;
    }
}

@keyframes nodeFloat {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-15px);
    }
}

/* Glass Cards */
.glass-card {
    background: rgba(17, 24, 39, 0.85);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    position: absolute;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    z-index: 10;
}

.stat-card.move-y {
    top: 10%;
    right: 5%;
    animation: floatY 6s infinite ease-in-out;
}

.stat-card.move-x {
    bottom: 10%;
    left: 5%;
    animation: floatX 7s infinite ease-in-out;
}

.icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #fff;
}

/* Services */
.services {
    padding: 6rem 5%;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 4rem;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

/* Animations & Interactivity Upgrade */

/* 1. Animated Gradient Borders for Highlights */
@keyframes borderRotate {
    100% {
        background-position: 200% 50%;
    }
}

.service-card.featured::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: var(--radius);
    padding: 2px;
    background: linear-gradient(60deg, #6366f1, #a855f7, #ec4899, #6366f1);
    background-size: 300% 300%;
    -webkit-mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    mask-composite: exclude;
    animation: borderRotate 4s linear infinite;
    pointer-events: none;
    opacity: 0.6;
}

/* 2. Floating Elements with more precise physics */
@keyframes pulse-glow {

    0%,
    100% {
        box-shadow: 0 0 20px rgba(99, 102, 241, 0.2);
    }

    50% {
        box-shadow: 0 0 40px rgba(99, 102, 241, 0.5);
    }
}

.gradient-sphere {
    /* Updated for smoother performance */
    will-change: transform;
}

/* 3. Text Reveal Animation for Hero */
.hero h1 span.reveal-text {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s ease-out forwards;
    display: inline-block;
}

.hero h1 span.reveal-text:nth-child(1) {
    animation-delay: 0.2s;
}

.hero h1 span.reveal-text:nth-child(2) {
    animation-delay: 0.4s;
}

.hero h1 span.reveal-text:nth-child(3) {
    animation-delay: 0.6s;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 4. Interactive Cards */
.service-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    padding: 2.5rem;
    border-radius: var(--radius);
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    /* Spring effect */
}

.service-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 20px 40px -10px rgba(99, 102, 241, 0.3);
    border-color: rgba(99, 102, 241, 0.5);
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.01));
}

.service-card .card-icon {
    transition: transform 0.4s ease;
    font-size: 2.5rem;
    color: var(--accent-secondary);
    margin-bottom: 1.5rem;
}

.service-card:hover .card-icon {
    transform: scale(1.2) rotate(5deg);
    color: #fff;
    text-shadow: 0 0 20px var(--accent-primary);
}

/* Contact Section */
.contact-section {
    padding: 6rem 0;
    display: flex;
    justify-content: center;
}

.contact-container {
    width: 90%;
    max-width: 1100px;
    background: #0f172a;
    border-radius: 24px;
    border: 1px solid var(--glass-border);
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    overflow: hidden;
}

.contact-info {
    padding: 3rem;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), transparent);
    border-right: 1px solid var(--glass-border);
}

.benefits {
    margin-top: 3rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.benefit-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.1rem;
    font-weight: 500;
}

.contact-form {
    padding: 3rem;
}

.input-group {
    margin-bottom: 1.5rem;
}

.input-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.input-group input,
.input-group select,
.input-group textarea {
    width: 100%;
    padding: 1rem;
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 8px;
    color: #fff;
    font-family: var(--font-body);
    font-size: 1rem;
    transition: all 0.2s;
}

.input-group input:focus,
.input-group select:focus,
.input-group textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
    background: #1e293b;
}

.submit-btn {
    width: 100%;
    padding: 1rem;
    border-radius: 8px;
    border: none;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    background: linear-gradient(to right, var(--accent-primary), var(--accent-secondary));
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.8rem;
    transition: filter 0.2s;
}

.submit-btn:hover {
    filter: brightness(1.1);
}

.submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.status-message {
    margin-top: 1rem;
    text-align: center;
    font-size: 0.9rem;
    min-height: 1.5rem;
}

.status-message.success {
    color: #4ade80;
}

.status-message.error {
    color: #f87171;
}

/* Footer */
footer {
    padding: 2rem 5%;
    border-top: 1px solid var(--glass-border);
    margin-top: auto;
    background: #020617;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.socials {
    display: flex;
    gap: 1.5rem;
}

.socials a {
    color: var(--text-secondary);
    font-size: 1.2rem;
    transition: color 0.3s;
}

.socials a:hover {
    color: #fff;
}

/* Animations */
@keyframes float {

    0%,
    100% {
        transform: translate(0, 0);
    }

    50% {
        transform: translate(30px, -30px);
    }
}

@keyframes floatY {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-20px);
    }
}

@keyframes floatX {

    0%,
    100% {
        transform: translateX(0);
    }

    50% {
        transform: translateX(-20px);
    }
}

/* Language Selector */
.language-selector {
    position: relative;
}

.lang-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.lang-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent-primary);
    transform: translateY(-2px);
}

.lang-btn i {
    color: var(--accent-primary);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    h1 {
        font-size: 2.8rem;
    }

    .hero {
        flex-direction: column;
        padding-top: 7rem;
        text-align: center;
    }

    .hero-buttons {
        justify-content: center;
    }

    .nav-links {
        display: none;
        /* Simplification for MVP */
    }

    .contact-container {
        grid-template-columns: 1fr;
    }

    .contact-info {
        display: none;
    }

    .hidden-mobile {
        display: none;
    }

    .logo span {
        display: inline;
    }
}