@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Space+Grotesk:wght@400;500;600;700&display=swap');

:root {
    /* Modern color scheme - dark theme */
    --primary-color: #3a86ff;
    --secondary-color: #00b4d8;
    --tertiary-color: #8338ec;
    --neon-green: #06d6a0;
    --neon-red: #ef476f;
    --background: #0f172a;
    --surface: #1e293b;
    --surface-alt: #334155;
    --text-primary: #ffffff;
    --text-secondary: #cbd5e1;
    --text-tertiary: #94a3b8;
    --gradient-primary: linear-gradient(120deg, var(--primary-color), var(--secondary-color));
    --gradient-secondary: linear-gradient(120deg, var(--tertiary-color), var(--primary-color));
    --gradient-brain: linear-gradient(120deg, var(--neon-green), var(--secondary-color), var(--tertiary-color));
    --box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    --border-radius: 0; /* Sharp edges for rectangular buttons */
    --font-primary: 'Space Grotesk', sans-serif;
    --font-secondary: 'Inter', sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-secondary);
    background-color: var(--background);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    cursor: auto; /* Changed from none to auto to restore standard pointer */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    font-feature-settings: "kern" 1, "liga" 1, "calt" 1;
    letter-spacing: -0.01em;
}

/* Custom Cursor */
.cursor {
    position: fixed;
    width: 8px;
    height: 8px;
    background: var(--primary-color);
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 9999;
    transition: width 0.1s, height 0.1s, background 0.2s;
    mix-blend-mode: screen;
    box-shadow: 0 0 8px var(--primary-color), 0 0 16px var(--secondary-color);
}

.cursor.hover {
    width: 10px;
    height: 10px;
    background: var(--secondary-color);
}

/* Neural Background */
.neural-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.18;
    image-rendering: high-quality;
    will-change: transform;
    pointer-events: none;
}

#neuralCanvas {
    width: 100%;
    height: 100%;
    image-rendering: crisp-edges;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-primary);
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
    letter-spacing: -0.02em;
    text-shadow: 0 0 1px rgba(255,255,255,0.1);
}

/* Mobile specific helpers */
.mobile-spacer {
    display: none;
}

@media (max-width: 768px) {
    .mobile-spacer {
        display: block;
        height: 20px;
        width: 100%;
    }
}

h1 {
    font-size: 4rem;
    text-shadow: 0 0 1px rgba(255,255,255,0.2);
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    text-align: center;
}

h3 {
    font-size: 1.5rem;
}

p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
    font-weight: 400;
    text-shadow: 0 0 1px rgba(160,160,184,0.1);
}

a {
    text-decoration: none;
    color: var(--text-primary);
    transition: var(--transition);
}

a:hover {
    color: var(--secondary-color);
}

.gradient-text {
    background-image: var(--gradient-primary);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-fill-color: transparent;
    filter: drop-shadow(0 0 2px rgba(0, 212, 255, 0.3));
    position: relative;
}

/* Layout */
section {
    padding: 6rem 10%;
}

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

/* Header & Navigation */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1.5rem 10%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    background-color: rgba(10, 10, 20, 0.8);
    transition: var(--transition);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

header.scrolled {
    padding: 1rem 10%;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.logo {
    font-family: var(--font-primary);
    font-size: 2rem;
    font-weight: 700;
}

.logo span {
    background-image: var(--gradient-primary);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-fill-color: transparent;
}

.mobile-menu-btn {
    display: none;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 101;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    font-weight: 500;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-image: var(--gradient-primary);
    transition: var(--transition);
}

.nav-link:hover::after {
    width: 100%;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    border-radius: var(--border-radius); /* Use the variable for rectangular buttons */
    font-weight: 600;
    transition: var(--transition);
    cursor: pointer;
    font-family: 'Roboto', sans-serif;
    text-align: center;
    text-transform: uppercase; /* More modern look */
    letter-spacing: 0.5px; /* Improved readability */
}

.btn.primary {
    background-image: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 12px rgba(58, 134, 255, 0.3);
    position: relative;
    overflow: hidden;
}

.btn.primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(58, 134, 255, 0.4);
}

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

.btn.secondary:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-3px);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 5rem;
    position: relative;
    overflow: visible; /* Changed to visible to prevent clipping */
    z-index: 1; /* Create stacking context */
}

/* No more pseudo-element for brain image - using a dedicated div instead */
.brain-image {
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    background-image: url('../assets/images/digital-brain.png');
    background-repeat: no-repeat;
    background-position: center right 8.5px;
    background-size: contain;
    opacity: 0.15;
    z-index: -1;
    mix-blend-mode: soft-light;
    pointer-events: none;
}

/* Mobile styles for brain image */
@media (max-width: 992px) {
    .brain-image {
        display: none; /* Hide on mobile - will be shown differently */
    }

    /* Add a small decorative brain to the empty area at top */
    .hero:after {
        content: '';
        display: block;
        position: absolute;
        top: 100px; /* Below the header */
        right: 20px;
        width: 120px;
        height: 120px;
        background-image: url('../assets/images/digital-brain.png');
        background-repeat: no-repeat;
        background-size: contain;
        opacity: 0.08;
        z-index: -1;
        mix-blend-mode: soft-light;
        pointer-events: none;
    }
    
    /* Give hero section clear stacking context */
    .hero {
        position: relative;
        z-index: 1;
    }
    
    .hero-content {
        width: 100%;
        position: relative;
        z-index: 5;
    }
    
    .hero-cta {
        position: relative;
        z-index: 5;
        width: 100%;
    }
    
    /* Force buttons above everything else */
    .btn {
        position: relative;
        z-index: 10;
    }
}

@media (max-width: 576px) {
    /* Even smaller brain image for small screens */
    .hero:after {
        top: 80px;
        right: 10px;
        width: 80px;
        height: 80px;
        opacity: 0.06;
    }
}

.hero-content {
    flex: 1;
    padding-right: 2rem;
    position: relative; /* Create stacking context */
    z-index: 5; /* Ensure this is above background elements */
}

.hero-content h1 {
    margin-bottom: 1.5rem;
    line-height: 1.1;
}

.hero-content p {
    font-size: 1.2rem;
    max-width: 600px;
    margin-bottom: 2rem;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    position: relative; /* Add stacking context */
    z-index: 10; /* Make sure buttons are always on top */
}

.hero-visual {
    flex: 1;
    position: relative;
    height: 100%;
}

.quantum-particle {
    width: 400px;
    height: 400px;
    position: relative;
    margin: 0 auto;
}

/* Services Section */
.services {
    background-color: var(--surface);
}

.service-grid {
    display: flex;
    gap: 2rem;
    width: 100%;
    flex-wrap: wrap;
}

.service-card {
    background-color: var(--surface-alt);
    padding: 2rem;
    border-radius: var(--border-radius);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    z-index: 1;
    flex: 0 0 calc(25% - 1.5rem);
    max-width: 100%;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: var(--gradient-primary);
    opacity: 0;
    z-index: -1;
    transition: var(--transition);
}

.service-card:hover {
    box-shadow: var(--box-shadow);
}

.service-card:hover::before {
    opacity: 0.05;
}

.service-icon {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    background-image: var(--gradient-primary);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-fill-color: transparent;
}

/* Approach Section */
.approach {
    position: relative;
}

.approach-container {
    display: flex;
    align-items: center;
    gap: 4rem;
}

.approach-steps {
    display: flex;
    gap: 2rem;
    width: 100%;
    flex-wrap: wrap;
}

.approach-step {
    position: relative;
    padding: 1.5rem;
    margin-top: 20px;
    background-color: var(--surface);
    border-radius: var(--border-radius);
    transition: var(--transition);
    flex: 0 0 calc(25% - 1.5rem);
    max-width: 100%;
}

.approach-step:hover {
    box-shadow: var(--box-shadow);
}

.step-number {
    position: absolute;
    top: -20px;
    right: 10px;
    width: 40px;
    height: 40px;
    background-image: var(--gradient-primary);
    border-radius: var(--border-radius); /* Use variable for rectangular shape */
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-primary);
    font-weight: 700;
    font-size: 0.9rem;
    z-index: 5;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.approach-visual {
    flex: 1;
    height: 400px;
    position: relative;
}

.neural-network {
    width: 100%;
    height: 100%;
}

#approachCanvas {
    width: 100%;
    height: 100%;
}

/* Showcase Section */
.showcase {
    background-color: var(--surface);
}

.showcase-grid {
    display: flex;
    gap: 2rem;
    width: 100%;
    flex-wrap: wrap;
}

.case-study {
    background-color: var(--surface-alt);
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: var(--transition);
    flex: 0 0 calc(25% - 1.5rem);
    max-width: 100%;
}

.case-study:hover {
    box-shadow: var(--box-shadow);
}

.case-img {
    height: 200px;
    overflow: hidden;
}

.case-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.case-study:hover .case-img img {
    transform: scale(1.05);
}

.case-study h3, .case-study p {
    padding: 0 1.5rem;
}

.case-study h3 {
    margin-top: 1.5rem;
}

.case-study p {
    padding-bottom: 1.5rem;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Contact Section */
.contact {
    display: flex;
    align-items: center;
    gap: 4rem;
}

.contact-content {
    flex: 1;
}

.contact-content h2 {
    text-align: left;
}

.contact-form {
    margin-top: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

input, select, textarea {
    width: 100%;
    padding: 1rem;
    border: none;
    background-color: var(--surface);
    border-radius: var(--border-radius);
    color: var(--text-primary);
    font-family: var(--font-secondary);
    transition: var(--transition);
}

input:focus, select:focus, textarea:focus {
    outline: none;
    box-shadow: 0 0 0 2px var(--primary-color);
}

textarea {
    min-height: 150px;
    resize: vertical;
}

.contact-visual {
    flex: 1;
    height: 400px;
    position: relative;
}

.particles {
    width: 100%;
    height: 100%;
}

#contactCanvas {
    width: 100%;
    height: 100%;
}

/* Carousel Styles */
.carousel-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    margin: 0 auto;
}

.carousel-track {
    transition: transform 0.5s ease;
    width: 100%;
    display: flex;
    gap: 2rem;
}

.carousel-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 2rem;
    gap: 1rem;
}

.carousel-prev, .carousel-next {
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: var(--border-radius); /* Use variable for rectangular buttons */
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    background-color: var(--surface-alt);
}

.carousel-prev:hover, .carousel-next:hover {
    background-color: var(--primary-color);
}

.carousel-indicators {
    display: flex;
    gap: 0.5rem;
}

.carousel-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--text-tertiary);
    cursor: pointer;
    transition: var(--transition);
}

.carousel-indicator.active {
    background-color: var(--primary-color);
    transform: scale(1.2);
}

.carousel-item {
    transition: var(--transition);
    width: 100%;
}

/* Footer */
footer {
    background-color: var(--surface);
    padding: 4rem 10% 1rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    margin-bottom: 3rem;
}

.footer-logo {
    font-family: var(--font-primary);
    font-size: 1.8rem;
    font-weight: 700;
}

.footer-logo span {
    background-image: var(--gradient-primary);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-fill-color: transparent;
}

.footer-links {
    display: flex;
    gap: 4rem;
}

.footer-col h4 {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 0.8rem;
}

.footer-col ul li a {
    color: var(--text-secondary);
}

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

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1.5rem;
    text-align: center;
}

.footer-bottom p {
    color: var(--text-tertiary);
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 1200px) {
    section {
        padding: 5rem 5%;
    }
    
    header {
        padding: 1.5rem 5%;
    }
    
    header.scrolled {
        padding: 1rem 5%;
    }
    
    .service-card,
    .approach-step,
    .case-study {
        flex: 0 0 calc(33.33% - 1.5rem);
    }
}

@media (max-width: 992px) {
    h1 {
        font-size: 3rem;
    }
    
    h2 {
        font-size: 2rem;
    }
    
    .hero {
        flex-direction: column;
        gap: 4rem;
        padding-top: 7rem; /* Increased top padding for mobile */
    }
    
    .hero-content {
        padding-right: 0;
        padding-top: 2rem; /* Extra padding for the hero content */
    }
    
    .approach-container {
        flex-direction: column;
    }
    
    .contact {
        flex-direction: column;
    }
    
    .service-card,
    .approach-step,
    .case-study {
        flex: 0 0 calc(50% - 1rem);
    }
    
    .service-grid,
    .approach-steps,
    .showcase-grid {
        flex-wrap: wrap;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 3rem;
    }
    
    .footer-links {
        gap: 2rem;
        flex-wrap: wrap;
    }
}

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: block;
    }
    
    nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        height: 100vh;
        background-color: var(--surface);
        padding: 6rem 2rem 2rem;
        transition: right 0.3s ease;
        z-index: 99;
        box-shadow: -5px 0 30px rgba(0, 0, 0, 0.2);
    }
    
    nav.active {
        right: 0;
    }
    
    nav ul {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .service-card,
    .approach-step,
    .case-study {
        flex: 0 0 100%;
        margin-bottom: 1.5rem;
        max-width: 100%;
    }
    
    .service-grid,
    .approach-steps,
    .showcase-grid {
        flex-direction: column;
        gap: 1rem;
    }
    
    .carousel-container {
        overflow-x: hidden;
        padding-bottom: 1rem;
        max-width: 100%;
    }
    
    .carousel-track {
        width: 100%;
        flex-wrap: nowrap;
        padding: 0;
    }
    
    .carousel-item {
        min-width: auto;
        width: 100%;
    }
}

@media (max-width: 576px) {
    h1 {
        font-size: 2.5rem;
        margin-top: 1rem; /* Add margin to the top of h1 */
    }
    
    h2 {
        font-size: 1.8rem;
    }
    
    .hero {
        padding-top: 8rem; /* Increased padding for very small screens */
        min-height: auto; /* Allow the hero to be smaller on mobile */
        padding-bottom: 3rem;
    }
    
    .hero-content {
        padding-top: 1rem; /* Additional padding for very small screens */
    }
    
    .hero-cta {
        flex-direction: column;
    }
    
    section {
        padding: 4rem 3%;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 2rem;
    }
    
    .carousel-nav {
        margin-top: 1rem;
    }
    
    /* Better typography on small screens */
    .gradient-text {
        display: inline-block; /* Ensures the gradient applies properly */
    }
}
