:root {
    /* Colors */
    --bg-dark: #050507;
    --bg-card: rgba(20, 20, 25, 0.6);
    --primary: #00f2ea;
    /* Cyan */
    --secondary: #ff0055;
    /* Magenta pop */
    --text-main: #ffffff;
    --text-muted: #a0a0a0;
    --accent-glow: rgba(0, 242, 234, 0.4);

    /* Fonts */
    --font-heading: 'Space Grotesk', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* Spacing */
    --container-max: 1200px;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

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

/* Typography */
h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    font-weight: 700;
    letter-spacing: -0.02em;
}

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

.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 20px;
}

.highlight {
    color: var(--primary);
}

.highlight-gradient {
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Buttons */
.btn-primary,
.btn-secondary {
    display: inline-block;
    padding: 14px 32px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    text-align: center;
}

.btn-primary {
    background: var(--primary);
    color: #000;
    box-shadow: 0 0 20px var(--accent-glow);
}

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

.btn-secondary {
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: transparent;
    color: var(--text-main);
    margin-left: 15px;
}

.btn-secondary:hover {
    border-color: var(--text-main);
    background: rgba(255, 255, 255, 0.05);
}

/* Glassmorphism */
.glass {
    background: rgba(10, 10, 15, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.glass-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 2rem;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.glass-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 1.2rem 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-left: 5%;
    padding-right: 5%;
}

.logo-text {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
}

.nav-links {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-links a {
    font-weight: 500;
    font-size: 0.95rem;
}

.nav-links a:hover {
    color: var(--primary);
}

/* Hero */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    padding-top: 80px;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 50%, rgba(0, 242, 234, 0.1) 0%, transparent 60%);
    z-index: -1;
}

.hero-title {
    font-size: 4.5rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.hero-title span {
    display: block;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 2.5rem;
}

/* Services */
.section {
    padding: 3rem 0;
    /* Reduced from 5rem */
}

.section-header {
    text-align: center;
    margin-bottom: 2.5rem;
    /* Reduced from 4rem */
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.section-desc {
    color: var(--text-muted);
    max-width: 500px;
    margin: 0 auto;
    font-size: 0.95rem;
}

/* Capability Grid (Technical Blocks) */
.capability-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
    max-width: 1000px;
    margin: 0 auto;
}

.capability-block {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 1.25rem 1.5rem;
    border-radius: 8px;
    /* Sharper corners for technical feel */
    font-family: var(--font-heading);
    font-size: 1rem;
    color: var(--text-main);
    transition: all 0.3s ease;
    text-align: left;
    display: flex;
    align-items: center;
}

.capability-block:before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    background: var(--primary);
    margin-right: 12px;
    border-radius: 0;
    /* Square dot for technical feel */
    opacity: 0.7;
    transition: all 0.3s;
}

.capability-block:hover {
    background: rgba(0, 242, 234, 0.05);
    border-color: var(--primary);
    transform: translateY(-2px);
}

.capability-block:hover:before {
    transform: scale(1.5);
    opacity: 1;
    box-shadow: 0 0 8px var(--primary);
}

/* AI Solutions */
.ai-solutions {
    position: relative;
    overflow: hidden;
    padding: 3rem 0;
}

.row {
    display: flex;
    gap: 3rem;
    /* Reduced gap */
    align-items: center;
}

.col-text {
    flex: 1;
}

.col-visual {
    flex: 1;
}

.badge {
    background: rgba(0, 242, 234, 0.1);
    color: var(--primary);
    padding: 4px 10px;
    border-radius: 4px;
    /* Less rounded */
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    display: inline-block;
    margin-bottom: 0.8rem;
    border: 1px solid rgba(0, 242, 234, 0.2);
}

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

.feature-list li {
    margin-bottom: 0.6rem;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
}

.check {
    color: var(--primary);
}

.code-snippet {
    background: #08080a;
    padding: 1.5rem;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    color: #00f2ea;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 6px;
    margin-bottom: 12px;
}

.red {
    background: #ff5f56;
}

.yellow {
    background: #ffbd2e;
}

.green {
    background: #27c93f;
}

/* Clients Marquee (Automated) */
.fluid-container {
    width: 100%;
    overflow: hidden;
    padding-left: 0;
    padding-right: 0;
}

.marquee-container {
    width: 100%;
    overflow: hidden;
    position: relative;
    padding: 2rem 0;
    background: transparent;
}

/* Fade Overlay for smoothness */
.marquee-container::before,
.marquee-container::after {
    content: '';
    position: absolute;
    top: 0;
    width: 100px;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

.marquee-container::before {
    left: 0;
    background: linear-gradient(to right, var(--bg-dark), transparent);
}

.marquee-container::after {
    right: 0;
    background: linear-gradient(to left, var(--bg-dark), transparent);
}

/* .marquee-track {
    display: flex;
    gap: 4rem;
    width: max-content;
    animation: scroll 30s linear infinite;
}*/

.marquee-track {
    display: flex;
    gap: 4rem;
    width: max-content;
    /* Animation removed for JS control */
    transform: translateX(0);
    /* will-change: transform; -> handled in logic */
    cursor: grab;
}

.marquee-track:active {
    cursor: grabbing;
}

/* Nav Arrows */
.nav-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--primary);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    opacity: 0;
    /* Hidden by default, shown on hover/interaction */
}

.marquee-container:hover .nav-arrow {
    opacity: 1;
}

.nav-arrow:hover {
    background: var(--primary);
    color: #000;
    box-shadow: 0 0 15px var(--accent-glow);
}

.prev-arrow {
    left: 10px;
}

.next-arrow {
    right: 10px;
}

/* Mobile: Always show arrows or rely on swipe. Let's make arrows visible but subtle */
@media (max-width: 768px) {
    .nav-arrow {
        opacity: 0.8;
        width: 35px;
        height: 35px;
        background: rgba(0, 0, 0, 0.4);
    }
}

/* Pause on hover if needed (user asked for desktop pause) */
/* .marquee-track:hover {
    animation-play-state: paused;
}
Wait, user said "Pause animation on hover (desktop only)".
*/
@media (min-width: 769px) {
    .marquee-track:hover {
        animation-play-state: paused;
    }
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-33.33%);
        /* Move by exactly one set (assuming 3 duplicate sets) */
    }

    /* Note on 33.33%: I added 3 sets of cards. 
       If I move by 1/3 of the total width, Set 2 moves to Set 1's position, creating a seamless loop.
    */
}

.innovation-track {
    display: flex;
    gap: 4rem;
    width: max-content;
    animation: scroll-innovation 40s linear infinite;
    /* Slower for more items */
}

@media (min-width: 769px) {
    .innovation-track:hover {
        animation-play-state: paused;
    }
}

@keyframes scroll-innovation {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

.mobile-menu-overlay {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    height: 100vh;
    background: rgba(10, 10, 15, 0.98);
    backdrop-filter: blur(15px);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.77, 0, 0.175, 1);
}

.mobile-menu-overlay.active {
    transform: translateX(0);
}

.mobile-nav-links {
    list-style: none;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.mobile-nav-links a {
    color: #fff;
    font-size: 1.5rem;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.3s;
    font-family: var(--font-heading);
}

.mobile-nav-links a:hover {
    color: var(--primary);
}


.no-scroll {
    overflow: hidden;
}

.client-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 200px;
    /* Slightly wider for text */
    height: 140px;
    /* Increased height to fit text */
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 1.2rem;
    cursor: pointer;
    transition: all 0.4s ease;
    /* Removed filter: grayscale(100%); for full color default */
    opacity: 1;
    /* Full opacity by default as well for clarity */
    text-decoration: none;
    /* Remove underline from anchor */
    gap: 0.8rem;
    /* Space between logo and text */
}

.project-card {
    background: rgba(255, 255, 255, 0.05);
    /* Slightly lighter for projects */
    border-color: rgba(255, 255, 255, 0.08);
}

.project-card:hover {
    box-shadow: 0 10px 25px rgba(0, 242, 234, 0.1);
    /* Cyan glow */
    border-color: rgba(0, 242, 234, 0.2);
}

.client-card img {
    max-width: 100%;
    height: 60px;
    /* Output fixed height for logo */
    object-fit: contain;
    transition: all 0.4s ease;
}

.client-name {
    font-family: var(--font-body);
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
    text-align: center;
    transition: all 0.4s ease;
    width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.client-card:hover {
    filter: grayscale(0%);
    opacity: 1;
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.08);
    /* More visible on hover */
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.client-card:hover .client-name {
    color: #fff;
    /* Brighten text on hover */
}


/* Mobile Optimizations */
@media (max-width: 768px) {
    .marquee-track {
        gap: 2rem;
        animation-duration: 20s;
        /* Faster on mobile if needed, or keep same */
    }

    .client-card {
        width: 160px;
        /* Slightly wider */
        height: 130px;
        /* Taller to fit text */
        padding: 1rem;
        /* Adjust padding */
        gap: 0.5rem;
        /* Reduce gap */
    }

    .client-card img {
        height: 40px;
        /* Smaller logo */
    }

    .client-name {
        font-size: 0.7rem;
        /* Smaller text */
        white-space: normal;
        /* Allow wrap on very small screens if needed, or keep nowrap */
    }

    .marquee-container::before,
    .marquee-container::after {
        width: 40px;
        /* Smaller fade area on mobile */
    }
}

/* Trusted Partners */
.partners {
    padding: 1.5rem 0;
    opacity: 0.6;
}

.partner-label {
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    margin-bottom: 0.3rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

.partner-name {
    font-size: 1.2rem;
    letter-spacing: 0.05em;
    color: var(--text-main);
}

/* Team - Professional Roster */
.roster-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    /* Compact gap */
    max-width: 1000px;
    margin: 0 auto;
}

.roster-item {
    text-align: left;
    padding: 1.5rem;
    border-left: 2px solid rgba(255, 255, 255, 0.1);
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.01), transparent);
    transition: all 0.3s;
}

.roster-item:hover {
    border-left-color: var(--primary);
    background: linear-gradient(90deg, rgba(0, 242, 234, 0.05), transparent);
}

/* URGENT FIX: Hero Text & Animation */
.animated-text .line {
    display: block !important;
    white-space: normal !important;
    text-align: center;
    width: 100%;
}

/* Word wrapper: keeps letters together, wraps only whole words */
.word {
    display: inline-block !important;
    white-space: nowrap !important;
    margin: 0 0.25em;
    /* Safe spacing */
}

/* Character: allows animation but stays inline */
.char {
    display: inline-block !important;
    opacity: 0;
    will-change: transform, opacity, filter;
    filter: blur(8px);
    animation: char-reveal 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

@keyframes char-reveal {
    0% {
        opacity: 0;
        transform: translateY(10px);
        filter: blur(8px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }
}

/* Responsive Scaling */
.hero-title {
    /* Use clamp for fluid scaling to prevent overflow */
    font-size: clamp(2rem, 5vw, 4rem);
    line-height: 1.2;
    word-break: keep-all;
    /* Prevent breaking inside words */
    overflow-wrap: break-word;
    /* Allow wrap if absolutely necessary */
}

/* Responsive Safety: On mobile, ensure transform doesn't cause glitches (optional, tested safe with Word wrapper) */
@media (max-width: 768px) {
    .roster-name {
        font-family: var(--font-heading);
        font-size: 1.2rem;
        color: var(--text-main);
        margin-bottom: 0.3rem;
        font-weight: 700;
    }

    .roster-role {
        display: block;
        color: var(--primary);
        font-size: 0.8rem;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        margin-bottom: 0.6rem;
        font-weight: 600;
    }

    .roster-desc {
        font-size: 0.9rem;
        color: var(--text-muted);
        line-height: 1.4;
    }

    /* Contact Details */
    .contact-links {
        margin-top: 1.5rem;
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }

    .contact-link {
        display: flex;
        align-items: center;
        gap: 0.8rem;
        font-size: 1rem;
        padding: 10px 14px;
        border-radius: 6px;
        background: rgba(255, 255, 255, 0.02);
        border: 1px solid rgba(255, 255, 255, 0.05);
    }

    .contact-link:hover {
        background: rgba(0, 242, 234, 0.08);
        border-color: var(--primary);
    }

    .social-links {
        margin-top: 0.8rem;
        display: flex;
        gap: 1rem;
        flex-wrap: wrap;
    }

    .social-links a {
        color: var(--primary);
        font-size: 0.9rem;
        text-decoration: none;
        position: relative;
        padding-bottom: 2px;
    }

    .social-links a:after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        width: 0%;
        height: 1px;
        background: var(--primary);
        transition: width 0.3s;
    }

    .social-links a:hover:after {
        width: 100%;
    }

    /* Contact Form Wrapper */
    .contact-wrapper {
        display: flex;
        flex-wrap: wrap;
        gap: 2rem;
        padding: 2rem;
        /* Reduced padding */
    }

    .contact-info,
    .contact-form {
        flex: 1;
        min-width: 280px;
    }

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

    input,
    select,
    textarea {
        width: 100%;
        padding: 16px 20px;
        background: rgba(10, 10, 15, 0.8); /* Deep charcoal background */
        backdrop-filter: blur(12px);
        border: 1px solid rgba(0, 242, 234, 0.2); /* Soft accent border */
        border-radius: 12px;
        box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.5); /* Inner depth */
        color: #f0f0f0; /* Soft white text */
        font-family: var(--font-body);
        font-size: 1rem;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        margin-top: 0.5rem; /* Spacing from label */
    }

    input::placeholder,
    textarea::placeholder {
        color: #888; /* Muted grey */
        font-weight: 400;
        letter-spacing: 0.02em;
    }

    input:focus,
    textarea:focus {
        outline: none;
        border-color: var(--primary); /* Bright accent on focus */
        background: rgba(10, 10, 15, 0.95); /* Slightly clearer */
        box-shadow: 0 0 15px rgba(0, 242, 234, 0.2), inset 0 2px 5px rgba(0, 0, 0, 0.5);
        transform: translateY(-2px);
    }

    /* Footer */
    .footer {
        border-top: 1px solid rgba(255, 255, 255, 0.05);
        padding: 3rem 0;
        margin-top: 4rem;
        text-align: center;
    }

    .footer-content {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0.8rem;
    }

    .footer-brand-name {
        font-size: 1.5rem;
        font-weight: 700;
        letter-spacing: -0.02em;
        color: var(--text-main);
        margin: 0;
    }

    .copyright {
        font-size: 0.9rem;
        color: var(--text-muted);
    }

    .footer-links {
        display: flex;
        gap: 1.5rem;
        margin-top: 0.5rem;
    }

    .footer-links a {
        font-size: 0.85rem;
        color: var(--text-muted);
        text-decoration: none;
        transition: color 0.3s;
    }

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

    /* Responsive */
    @media (max-width: 768px) {
        .nav-links {
            display: none !important;
        }

        .mobile-toggle {
            display: flex !important;
            position: absolute;
            right: 20px;
            top: 25px;
        }

        select,
        textarea {
            width: 100% !important;
            box-sizing: border-box;
            max-width: 100vw;
        }

        .capability-grid,
        .roster-grid {
            grid-template-columns: 1fr;
        }
    }