:root {
    /* Color Palette - Light Theme (RoboBot Blue) */
    --color-bg: #ffffff;
    --color-surface: #f4f6f8;
    --color-text-main: #333333;
    --color-text-highlight: #00baa3;
    /* Secondary Accent */
    --color-accent: #0056b3;
    /* Primary Blue */
    --color-white: #ffffff;
    --color-black: #000000;

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 8rem;

    /* Typography */
    --font-main: 'Inter', system-ui, -apple-system, sans-serif;
    --font-heading: 'Orbitron', sans-serif;
    /* Tech feel */

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease-in-out;
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--color-bg);
    color: var(--color-text-main);
    font-family: var(--font-main);
    line-height: 1.6;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--color-accent);
    font-family: var(--font-heading);
    margin-bottom: var(--spacing-sm);
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-fast);
}

img {
    max-width: 100%;
    display: block;
}

/* Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}

.btn {
    display: inline-block;
    padding: 0.6rem 1.5rem;
    background-color: transparent;
    border: 1px solid var(--color-text-highlight);
    color: var(--color-text-highlight);
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all var(--transition-normal);
}

.btn:hover {
    background-color: var(--color-text-highlight);
    color: var(--color-white);
    box-shadow: 0 0 10px rgba(0, 186, 163, 0.4);
}

.btn-primary {
    background-color: var(--color-text-highlight);
    color: var(--color-white);
}

.btn-primary:hover {
    background-color: var(--color-accent);
    border-color: var(--color-accent);
    color: var(--color-white);
}

/* Header */
header {
    background-color: rgba(255, 255, 255, 0.98);
    padding: 0.5rem 0;
    position: fixed;
    width: 60%;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #e1e4e8;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease-in-out;
    margin: 10px auto;
    left: 0;
    right: 0;
    border-radius: 25px;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 35px !important;
    vertical-align: middle;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    list-style: none;
    align-items: center;
}

.nav-links a {
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nav-links a:hover {
    color: var(--color-accent);
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background-color: #ffffff;
    padding-top: var(--spacing-lg);
    position: relative;
    overflow: hidden;
}

#hero-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    background: rgba(255, 255, 255, 0.7);
    padding: 2rem;
    border-radius: 16px;
    backdrop-filter: blur(5px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    /* animation: fadeUp 1s ease-out forwards; */
    transition: opacity 1.5s ease-out !important;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: var(--spacing-md);
    color: var(--color-accent);
}

/* Tech Badges */
.tech-badge {
    padding: 0.4rem 1rem;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #e1e4e8;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #333;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* Sections */
section {
    padding: var(--spacing-xl) 0;
}

.section-title {
    text-align: center;
    margin-bottom: var(--spacing-lg);
    font-size: 2.5rem;
    color: var(--color-accent);
}

/* Footer */
footer {
    background-color: var(--color-surface);
    padding: var(--spacing-lg) 0;
    transition: color 0.3s;
}

/* Services Grid & Cards (Fixed) */
/* Services Grid & Cards (Fixed Layout) */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    align-items: start;
    /* Prevent row stretching */
}

.services-grid:hover .service-card {
    transform: scale(0.95);
    opacity: 0.7;
    filter: blur(1px);
}

.service-card {
    background: var(--color-bg);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid #e1e4e8;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    z-index: 1;
    height: 350px;
    /* Fixed height to prevent layout shift */
    display: flex;
    flex-direction: column;
}

.service-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0.15;
    transition: all 0.4s ease;
    filter: grayscale(100%);
}

.service-card:hover .service-bg {
    opacity: 0.25;
    transform: scale(1.1);
    filter: grayscale(0%);
}

.service-card>*:not(.service-bg) {
    /* position: relative; */
    z-index: 2;
}

.services-grid .service-card:hover {
    transform: scale(1.05);
    opacity: 1;
    filter: blur(0);
    box-shadow: 0 10px 30px rgba(0, 86, 179, 0.15);
    border-color: rgba(0, 186, 163, 0.2);
    z-index: 10;
}

.service-card:hover h3 {
    color: var(--color-text-highlight);
}

.service-desc {
    color: #666;
    margin-bottom: 1rem;
    flex-grow: 1;
    /* Push details to bottom */
}

.service-details {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, var(--color-bg) 90%, rgba(255, 255, 255, 0));
    padding: 1.5rem;
    transform: translateY(100%);
    /* Hidden below */
    transition: transform 0.4s ease;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.service-card:hover .service-details {
    transform: translateY(0);
    /* Slide up */
}

.service-details p {
    font-size: 0.95rem;
    color: var(--color-text-main);
    line-height: 1.5;
}

/* Animations */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Company Showcase (Sticky Horizontal Scroll) */
.horizontal-section {
    height: 300vh;
    /* Scroling distance */
    position: relative;
    background-color: var(--color-surface);
}

.sticky-wrapper {
    position: sticky;
    top: 0;
    height: 100vh;
    overflow: hidden;
    display: flex;
    align-items: center;
}

.scroll-track {
    display: flex;
    gap: 4rem;
    /* Larger gap for better separation */
    padding: 0;
    /* Start with some padding */
    width: max-content;
    /* Ensure container fits all cards */
    will-change: transform;
}

.scroll-card {
    min-width: 60vw;
    max-width: 70vw;
    /* Larger cards for showcase */
    height: 60vh;
    /* Responsive height */
    border-radius: 20px;
    position: relative;
    overflow: hidden;
    background: white;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

@media (min-width: 768px) {
    .scroll-card {
        min-width: 45vw;
        /* Default Desktop width */
        height: 500px;
    }

    /* Variable Widths for Desktop */
    .w-sm {
        min-width: 30vw !important;
    }

    .w-md {
        min-width: 50vw !important;
    }

    .w-lg {
        min-width: 70vw !important;
    }
}

.text-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 4rem;
    background: linear-gradient(135deg, var(--color-text-highlight), var(--color-accent));
    color: white;
}

.text-card h3 {
    color: white;
    font-size: 3rem;
    /* Larger text */
    margin-bottom: 2rem;
}

.text-card p {
    font-size: 1.25rem;
    line-height: 1.8;
    opacity: 0.95;
}

.video-placeholder {
    width: 100%;
    height: 100%;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.stats-card {
    display: flex;
    justify-content: space-around;
    align-items: center;
    background: white;
    border: 1px solid #e1e4e8;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 4rem;
    /* Larger stats */
    font-weight: 700;
    color: var(--color-text-highlight);
    font-family: var(--font-heading);
    margin-bottom: 1rem;
}

.stat-label {
    font-size: 1.2rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
    padding: 3rem;
    color: white;
}

.card-overlay h3 {
    color: white;
    margin: 0;
    font-size: 2rem;
}

/* --- Preloader --- */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.8s ease-out;
}

.preloader.fade-out {
    opacity: 0;
    pointer-events: none;
}

.preloader-text {
    font-family: var(--font-heading);
    font-size: 4rem;
    font-weight: 700;
    color: var(--color-text-highlight);
    letter-spacing: 0.5rem;
    text-transform: uppercase;
}

/* Ensure Canvas is always visible */
#hero-canvas {
    opacity: 1 !important;
    z-index: 0;
}

/* --- Mobile Responsiveness --- */
@media (max-width: 768px) {

    /* Adjust spacing */
    :root {
        --spacing-lg: 2.5rem;
        --spacing-xl: 4rem;
    }

    /* Typography */
    .hero h1 {
        font-size: 2rem;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .hero-content p {
        font-size: 1rem !important;
    }

    /* Layout */
    .hero-content {
        width: 95%;
        margin: 0 auto;
        padding: 1.5rem;
    }

    /* Stack buttons */
    .hero-content div[style*="flex"] {
        flex-direction: column;
        gap: 0.8rem !important;
    }

    .btn {
        width: 100%;
        display: block;
        text-align: center;
    }

    /* Header */
    .logo img {
        height: 25px !important;
    }

    .nav-links a {
        font-size: 0.8rem;
    }

    /* Stats Card */
    .stats-card {
        flex-direction: column;
        gap: 2rem;
        padding: 2rem;
    }

    /* Text Card */
    .text-card {
        padding: 2rem;
    }

    .text-card h3 {
        font-size: 2rem;
    }

    /* --- Mobile Navigation --- */

    /* Hide Desktop Nav & Logo */
    .nav-links {
        display: none !important;
    }

    /* Burger Menu Icon */
    .burger-menu {
        display: flex;
        flex-direction: column;
        justify-content: space-around;
        width: 30px;
        height: 25px;
        cursor: pointer;
        z-index: 2000;
        margin-left: auto;
        /* Push to right */
    }

    .burger-menu span {
        width: 100%;
        height: 3px;
        background-color: var(--color-accent);
        transition: all 0.3s ease;
    }

    /* Animate Burger to X */
    .burger-menu.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 6px);
    }

    .burger-menu.active span:nth-child(2) {
        opacity: 0;
    }

    .burger-menu.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -6px);
    }

    /* Mobile Nav Overlay */
    .mobile-nav-overlay {
        position: fixed;
        top: 0;
        right: 0;
        width: 70%;
        height: 100vh;
        background: rgba(255, 255, 255, 0.98);
        z-index: 1500;
        transform: translateX(100%);
        /* Hidden by default */
        transition: transform 0.4s ease-in-out;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    }

    .mobile-nav-overlay.active {
        transform: translateX(0);
        /* Slide in */
    }

    .mobile-nav-links {
        list-style: none;
        text-align: center;
    }

    .mobile-nav-links li {
        margin: 1.5rem 0;
    }

    .mobile-nav-links a {
        font-size: 1.5rem;
        color: var(--color-text-main);
        font-weight: 700;
        text-transform: uppercase;
    }

    .mobile-nav-links a:hover {
        color: var(--color-accent);
    }
}

/* --- Mobile Responsiveness --- */
@media (min-width: 769px) and (max-width: 1920px) {

    /* Desktop Responsiveness */
    .mobile-nav-overlay {
        display: none;
    }

    .burger-menu {
        display: none;
    }
}

/* --- Pixel World Map Section --- */
.pixel-map-section {
    padding: var(--spacing-xl) 0;
    background: linear-gradient(135deg, #0a1628 0%, #1a2332 100%);
    color: white;
}

.pixel-map-section .section-title {
    color: white;
}

.map-container {
    position: relative;
    width: 100%;
    height: 600px;
    background:
        radial-gradient(2px 2px at 20% 30%, rgba(255, 255, 255, 0.05) 0%, transparent 100%),
        radial-gradient(2px 2px at 60% 70%, rgba(255, 255, 255, 0.05) 0%, transparent 100%),
        radial-gradient(1px 1px at 50% 50%, rgba(255, 255, 255, 0.03) 0%, transparent 100%),
        radial-gradient(1px 1px at 80% 10%, rgba(255, 255, 255, 0.03) 0%, transparent 100%),
        linear-gradient(180deg, #0d1b2a 0%, #1b263b 100%);
    background-size: 200% 200%, 300% 300%, 100% 100%, 150% 150%, 100% 100%;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: inset 0 0 50px rgba(0, 0, 0, 0.5);
}

/* Continent Background Pixels (non-interactive) */
.continent-pixel {
    position: absolute;
    width: 3px;
    height: 3px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 5;
}

/* Animated Pixel Markers */
.map-pixel {
    position: absolute;
    width: 12px;
    height: 12px;
    background: var(--color-text-highlight);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    cursor: pointer;
    z-index: 10;
    box-shadow: 0 0 10px var(--color-text-highlight),
        0 0 20px rgba(0, 186, 163, 0.5);
    animation: pulse 2s ease-in-out infinite;
    transition: all 0.3s ease;
}

.map-pixel:hover,
.map-pixel.active {
    transform: translate(-50%, -50%) scale(1.5);
    box-shadow: 0 0 20px var(--color-text-highlight),
        0 0 40px rgba(0, 186, 163, 0.7);
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
        box-shadow: 0 0 10px var(--color-text-highlight),
            0 0 20px rgba(0, 186, 163, 0.5);
    }

    50% {
        opacity: 0.7;
        box-shadow: 0 0 15px var(--color-text-highlight),
            0 0 30px rgba(0, 186, 163, 0.7);
    }
}

/* Project Detail Cards */
.project-card {
    position: absolute;
    transform: translate(-50%, calc(-100% - 20px));
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 1.5rem;
    border-radius: 12px;
    min-width: 250px;
    max-width: 300px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 100;
    border: 1px solid rgba(0, 186, 163, 0.3);
}

.project-card.active {
    opacity: 1;
    pointer-events: auto;
    transform: translate(-50%, calc(-100% - 25px));
}

.project-card h4 {
    margin: 0 0 0.5rem 0;
    color: var(--color-accent);
    font-size: 1.2rem;
    font-family: var(--font-heading);
}

.project-card .card-location {
    margin: 0 0 0.5rem 0;
    color: var(--color-text-highlight);
    font-weight: 600;
    font-size: 0.9rem;
}

.project-card .card-desc {
    margin: 0;
    color: #333;
    font-size: 0.95rem;
    line-height: 1.4;
}

/* Mobile Adjustments for Map */
@media (max-width: 768px) {
    .map-container {
        height: 400px;
    }

    .project-card {
        min-width: 200px;
        max-width: 250px;
        padding: 1rem;
    }

    .project-card h4 {
        font-size: 1rem;
    }
}