:root {
    --primary: #0B2545;
    --accent: #99CC33;
    --white: #FFFFFF;
    --bg-color: #F4F5F7;
    --focus-color: #FFB703;
    /* For accessibility focus */
    --font-main: 'Inter', sans-serif;
    --font-headings: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    --butterfly-color: #E63946;
    /* User requested red butterfly element */
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body,
html {
    margin: 0;
    padding: 0;
    width: 100%;
    font-family: var(--font-body);
    background-color: var(--bg-color);
    color: var(--primary);
    scroll-behavior: smooth;
}

/* Accessibility Focus */
*:focus-visible {
    outline: 3px solid var(--focus-color);
    outline-offset: 2px;
    border-radius: 4px;
}

/* =========================================
   HEADER (TOP BAR & MAIN NAV)
   ========================================= */
.header-wrapper {
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: var(--white);
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

/* Main Navigation */
.main-nav {
    position: relative;
    width: 100%;
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: padding 0.4s ease;
}

.nav-brand {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--primary);
    text-decoration: none;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 30px;
    height: 30px;
    gap: 5px;
    cursor: pointer;
    z-index: 1001;
}

.hamburger span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: #0B2545;
    /* Explicit deep navy hex */
    border-radius: 3px;
    transition: all 0.3s ease;
}

.nav-links {
    display: flex;
    gap: 35px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-links li a {
    color: var(--primary);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.3px;
    transition: color 0.3s ease;
}

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

/* Header Scroll States */
.header-wrapper.scrolled .main-nav {
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    padding: 15px 40px;
}

.main-content {
    margin-top: 0;
}

/* =========================================
   HERO SECTION
   ========================================= */
.hero-section {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Background Visual Element */
.hero-bg-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
    background-color: var(--primary);
    /* Deep Navy #0B2545 */
}

/* High Performance Canvas */
#dotsCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: auto;
    /* Required for hover effects on canvas */
}

/* Vignette overlay for text readability */
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, transparent 0%, rgba(11, 37, 69, 0.95) 150%);
    z-index: 2;
    pointer-events: none;
}

/* Hero Content */
.hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
    max-width: 1000px;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Staggered Title */
.hero-title {
    font-size: 6rem;
    font-weight: 900;
    line-height: 1.05;
    letter-spacing: -3px;
    margin: 0 0 30px 0;
}

.hero-title-line:first-child {
    background: linear-gradient(135deg, #ffffff 0%, #e0e0e0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-title-wrapper:last-child .hero-title-line {
    background: linear-gradient(135deg, #99CC33 0%, #00d2ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-title-wrapper {
    overflow: hidden;
    /* Enables the mask-up reveal effect */
    padding-bottom: 5px;
    /* Prevent clipping */
}

.hero-title-line {
    display: block;
}

/* Buttons */
.hero-buttons {
    display: flex;
    gap: 20px;
}

.btn {
    padding: 16px 36px;
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    text-decoration: none;
    display: inline-block;
}

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

.btn-primary:hover {
    transform: scale(1.05);
    background-color: #a7df38;
    box-shadow: 0 10px 20px rgba(153, 204, 51, 0.2);
}

.btn-secondary {
    background-color: transparent;
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.4);
}

.btn-secondary:hover {
    background-color: var(--white);
    color: var(--primary);
    transform: scale(1.05);
}

/* Hide elements before GSAP initializes to prevent FOUC */
.header-wrapper,
.hero-title-line,
#heroSubtitle,
#heroButtons {
    visibility: hidden;
}

/* Responsive Design */
@media (max-width: 992px) {
    .hero-title {
        font-size: 4rem;
    }

    .hamburger {
        display: flex !important;
    }

    .nav-links {
        display: none !important;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--white);
        padding: 20px 40px;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
        gap: 20px;
    }

    .nav-links.active {
        display: flex !important;
    }

    .hamburger.active span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 3rem;
        letter-spacing: -1px;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .hero-buttons {
        flex-direction: column;
        width: 100%;
        max-width: 300px;
    }

    .btn {
        width: 100%;
        text-align: center;
    }
}

/* Services Section */
.services-section {
    position: relative;
    padding: 120px 40px;
    background-color: #f0f4f8;
    background-image: radial-gradient(#d9e2ec 2px, transparent 2px);
    background-size: 30px 30px;
    color: var(--primary);
    overflow: hidden;
}

.services-ambient-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.ambient-shape {
    position: absolute;
    border: 1px solid rgba(11, 37, 69, 0.05);
    /* very subtle wireframe */
    transform-style: preserve-3d;
    will-change: transform;
    animation: drift 20s infinite linear alternate;
}

.ambient-shape.shape-1 {
    width: 400px;
    height: 400px;
    top: 10%;
    left: 5%;
    border-radius: 20px;
    animation-duration: 25s;
}

.ambient-shape.shape-2 {
    width: 600px;
    height: 600px;
    top: 40%;
    right: -5%;
    border-radius: 50%;
    animation-duration: 30s;
    animation-direction: alternate-reverse;
}

.ambient-shape.shape-3 {
    width: 300px;
    height: 300px;
    bottom: 10%;
    left: 20%;
    border-radius: 10px;
    animation-duration: 22s;
}

.ambient-shape.shape-4 {
    width: 500px;
    height: 500px;
    top: 5%;
    right: 20%;
    border-radius: 30%;
    animation-duration: 28s;
}

@keyframes drift {
    0% {
        transform: translate3d(0, 0, 0) rotate(0deg) scale(1);
    }

    100% {
        transform: translate3d(50px, 30px, 0) rotate(15deg) scale(1.05);
    }
}

.services-container {
    position: relative;
    z-index: 2;
    max-width: 1400px;
    margin: 0 auto;
}

.services-header {
    text-align: center;
    margin-bottom: 60px;
}

.services-header .section-title {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 10px;
}

.services-header .section-subtitle {
    font-size: 1.2rem;
    color: #555;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    perspective: 1500px;
    /* Crucial for 3D card tilt */
}

.service-card-wrapper {
    perspective: 1500px;
}

.service-card {
    position: relative;
    background: var(--white);
    border-radius: 20px;
    padding: 0;
    height: 450px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    overflow: hidden;
    transform-style: preserve-3d;
    backface-visibility: hidden;
    transition: transform 0.1s, box-shadow 0.4s ease, outline 0.4s ease;
    box-shadow: 0 10px 30px rgba(11, 37, 69, 0.08);
    outline: 2px solid transparent;
    cursor: pointer;
    will-change: transform;
}

.service-card:hover,
.service-card:focus-within {
    box-shadow: 0 20px 50px rgba(11, 37, 69, 0.15),
        0 0 20px rgba(153, 204, 51, 0.2);
    /* lime glow */
    outline: 2px solid var(--accent);
    /* Lime Green Outline */
    transition: box-shadow 0.4s ease, outline 0.4s ease;
    /* Remove transform transition for smooth mouse JS tracking */
}

.service-image-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    backface-visibility: hidden;
    /* Layer 2 Parallax is handled via JS */
    transition: transform 0.1s;
    will-change: transform;
}

.service-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* High quality scaling */
    opacity: 0.8;
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.service-card:hover .service-img,
.service-card:focus-within .service-img {
    opacity: 1;
}

.service-info {
    position: relative;
    z-index: 10;
    background: linear-gradient(to top, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0.8) 70%, rgba(255, 255, 255, 0) 100%);
    padding: 60px 30px 30px 30px;
    transform: translateZ(40px);
    /* Lift text out of the card slightly */
    transform-style: preserve-3d;
    pointer-events: none;
    /* Let hover events pass to card */
}

.service-info h3 {
    margin: 0 0 10px 0;
    font-size: 1.6rem;
    color: var(--primary);
}

.sub-details {
    font-size: 0.95rem;
    color: #444;
    line-height: 1.5;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s cubic-bezier(0.25, 1, 0.5, 1),
        transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.service-card:hover .sub-details,
.service-card:focus-within .sub-details {
    opacity: 1;
    transform: translateY(0);
}

/* =========================================
   PREMIUM HORIZONTAL SCROLLING ABOUT SECTION
   ========================================= */
.horizontal-scroll-section {
    position: relative;
    width: 100%;
    background-color: #040d1a;
    /* Even darker, richer navy for premium feel */
    /* Subtle tech grid pattern for dark background */
    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;
    background-position: center center;
    color: #FFFFFF;
}

.horizontal-sticky-container {
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    overflow: hidden;
}

.horizontal-track {
    display: flex;
    align-items: center;
    height: 100%;
    width: max-content;
    flex-shrink: 0;
    padding-left: 10vw;
    padding-right: 20vw;
    gap: 8vw;
    /* Spacing between all items (intro + panels) */
    will-change: transform;
    position: relative;
}

/* The continuous timeline background line */
.continuous-timeline-line {
    position: absolute;
    left: 0;
    top: 50%;
    height: 1px;
    width: 100%;
    background: linear-gradient(90deg, transparent 5%, rgba(153, 204, 51, 0.3) 15%, rgba(153, 204, 51, 0.3) 90%, transparent 100%);
    z-index: 1;
    transform: translateY(-50%);
}

/* Intro Block */
.horizontal-intro {
    width: 60vw;
    max-width: 800px;
    flex-shrink: 0;
    z-index: 10;
    position: relative;
}

.intro-content {
    background: radial-gradient(circle at center, rgba(4, 13, 26, 0.8) 0%, transparent 70%);
    padding: 40px 0;
}

.about-subheading {
    display: inline-block;
    color: #99cc33;
    text-transform: uppercase;
    font-weight: 800;
    letter-spacing: 4px;
    font-size: 1rem;
    margin-bottom: 30px;
    padding: 8px 16px;
    border: 1px solid rgba(153, 204, 51, 0.3);
    border-radius: 30px;
}

.about-heading {
    font-size: clamp(2.5rem, 4vw, 3.8rem);
    font-weight: 800;
    line-height: 1.15;
    color: #FFFFFF;
    margin: 0 0 25px 0;
    letter-spacing: -1px;
}

.about-description {
    font-size: 1.4rem;
    line-height: 1.6;
    color: #A0B0C0;
    max-width: 600px;
}

/* Individual Panel */
.history-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 450px;
    height: 100%;
    flex-shrink: 0;
    z-index: 5;
    position: relative;
    opacity: 0.2;
    transform: scale(0.9) translateY(20px);
    transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1), transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.history-panel.is-visible {
    opacity: 1;
    transform: scale(1) translateY(0);
}

/* Zig-Zag Panel Shifting */
.history-panel.panel-up .panel-content {
    margin-top: -180px;
    /* Shift card above the line */
}

.history-panel.panel-down .panel-content {
    margin-top: 180px;
    /* Shift card below the line */
}

.panel-timeline {
    position: absolute;
    top: 50%;
    left: -40px;
    /* Offset marker to sit on the left edge */
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 2;
}

.panel-marker {
    width: 16px;
    height: 16px;
    background-color: #040d1a;
    border: 3px solid #99cc33;
    border-radius: 50%;
    box-shadow: 0 0 20px rgba(153, 204, 51, 0.6);
    margin-bottom: 20px;
    transition: background-color 0.4s ease;
}

.history-panel:hover .panel-marker {
    background-color: #99cc33;
}

/* Year Badge Styling inside the card */
.panel-year {
    display: inline-block;
    font-size: 0.85rem;
    font-weight: 800;
    color: #99cc33;
    background: rgba(153, 204, 51, 0.1);
    border: 1px solid rgba(153, 204, 51, 0.3);
    border-radius: 20px;
    padding: 6px 16px;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 20px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

/* Vertical Zig-Zag Connecting Lines */
.panel-timeline::after {
    content: '';
    position: absolute;
    left: 7px;
    /* Center with the 16px marker */
    width: 2px;
    z-index: 1;
}

.history-panel.panel-up .panel-timeline::after {
    bottom: 26px;
    /* Start just above the marker */
    height: 100px;
    background: linear-gradient(to top, rgba(153, 204, 51, 0.5), transparent);
}

.history-panel.panel-down .panel-timeline::after {
    top: 6px;
    /* Start just below the marker */
    height: 100px;
    background: linear-gradient(to bottom, rgba(153, 204, 51, 0.5), transparent);
}

.panel-content {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 24px;
    padding: 50px 40px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), background 0.5s ease;
    /* Adjust positioning to make room for marker */
    margin-left: 30px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.history-panel:hover .panel-content {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(153, 204, 51, 0.3);
}

.panel-content h3 {
    font-size: 2rem;
    font-weight: 800;
    color: #FFFFFF;
    margin: 0 0 20px 0;
    letter-spacing: -0.5px;
}

.panel-content p {
    font-size: 1.15rem;
    line-height: 1.7;
    color: #8A9BAE;
    margin: 0;
}

/* Detail Button */
.panel-details-btn {
    position: absolute;
    bottom: 40px;
    right: 40px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #FFFFFF;
    font-size: 1.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.history-panel:hover .panel-details-btn {
    background-color: #99cc33;
    border-color: #99cc33;
    color: #040d1a;
    transform: rotate(90deg);
}

/* Responsive constraints */
@media (max-width: 1024px) {
    .horizontal-intro {
        width: 70vw;
    }

    .history-panel {
        width: 380px;
    }
}

@media (max-width: 768px) {
    .horizontal-scroll-section {
        height: auto !important;
        padding: 80px 0;
    }

    .horizontal-sticky-container {
        position: relative;
        height: auto;
        overflow: visible;
    }

    .horizontal-track {
        flex-direction: column;
        width: 100%;
        padding: 0 20px;
        gap: 60px;
        transform: none !important;
    }

    .continuous-timeline-line {
        display: none;
    }

    .horizontal-intro {
        width: 100%;
        padding: 0;
    }

    .history-panel {
        width: 100%;
        opacity: 1;
        transform: none;
    }

    .history-panel.panel-up .panel-content,
    .history-panel.panel-down .panel-content {
        margin-top: 0;
    }

    .panel-timeline {
        position: relative;
        top: 0;
        left: 0;
        transform: none;
        align-items: flex-start;
        margin-bottom: 20px;
    }

    .panel-year {
        margin-bottom: 15px;
    }

    .panel-timeline::after {
        display: none;
    }

    .panel-marker {
        display: none;
    }

    .panel-content {
        margin-left: 0;
    }
}

/* Product Portfolio Section - Simple Grid */
.product-portfolio-section {
    padding: 100px 40px 180px 40px;
    background-color: #f8fafc;
    /* Clear and crisp dot-matrix pattern */
    background-image: radial-gradient(#94a3b8 2px, transparent 2px);
    background-size: 30px 30px;
    background-position: center center;
    position: relative;
}

.portfolio-header {
    text-align: center;
    margin-bottom: 60px;
}

.portfolio-header .section-title {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 15px;
}

.portfolio-header .section-subtitle {
    font-size: 1.2rem;
    color: var(--accent);
    font-weight: 600;
}

/* Simple CSS Grid */
.simple-product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    /* Force all products into one row */
    gap: 20px;
    max-width: 1400px;
    margin: 0 auto;
}

.product-card {
    width: 100%;
}

.product-card-inner {
    position: relative;
    width: 100%;
    height: 380px;
    /* Small boxes */
    border-radius: 15px;
    background-color: var(--primary);
    box-shadow: 0 10px 20px rgba(11, 37, 69, 0.05);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    /* Align content to bottom */
}

.product-card-inner:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(11, 37, 69, 0.2);
}

.product-image-wrapper {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    overflow: hidden;
}

/* Gradient overlay to ensure text readability over the background image */
.product-image-wrapper::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(11, 37, 69, 0.95) 0%, rgba(11, 37, 69, 0.4) 50%, rgba(11, 37, 69, 0.1) 100%);
    z-index: 2;
    transition: background 0.3s ease;
}

.product-card-inner:hover .product-image-wrapper::after {
    background: linear-gradient(to top, rgba(11, 37, 69, 0.98) 0%, rgba(11, 37, 69, 0.5) 50%, rgba(11, 37, 69, 0.2) 100%);
}

.product-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Cover the entire background */
    transition: transform 0.6s ease;
    z-index: 1;
}

.product-card-inner:hover .product-img {
    transform: scale(1.1);
}

.product-content {
    position: relative;
    z-index: 3;
    /* Above the image and gradient overlay */
    padding: 25px 20px;
    display: flex;
    flex-direction: column;
}

.product-content h3 {
    font-size: 1.2rem;
    color: var(--white);
    margin-bottom: 8px;
    line-height: 1.3;
}

.product-content p {
    font-size: 0.85rem;
    color: #DDDDDD;
    margin-bottom: auto;
    line-height: 1.4;
}

.view-tag {
    display: inline-block;
    align-self: flex-start;
    color: var(--accent);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 15px;
    transition: color 0.3s ease;
}

.product-card-inner:hover .view-tag {
    color: var(--white);
}

/* Mobile Responsive */
@media (max-width: 1000px) {
    .product-portfolio-section {
        padding: 80px 20px 160px 20px;
        /* Preserve bottom padding on smaller screens */
    }

    .portfolio-header .section-title {
        font-size: 2rem;
    }

    .simple-product-grid {
        grid-template-columns: repeat(2, 1fr);
        /* 2 rows of 2 on tablet */
    }
}

@media (max-width: 600px) {
    .simple-product-grid {
        grid-template-columns: 1fr;
        /* 1 column on mobile */
    }
}

/* Clients Section */
.clients-section {
    padding: 100px 40px;
    background-color: var(--white);
    overflow: hidden;
    position: relative;
}

.clients-container {
    max-width: 1400px;
    margin: 0 auto;
}

.clients-header {
    text-align: center;
    margin-bottom: 60px;
}

.clients-header .section-title {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 10px;
}

.clients-header .section-subtitle {
    font-size: 1.2rem;
    color: var(--accent);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.clients-logo-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 40px 50px;
    padding: 20px 0;
}

.client-logo-img {
    height: 70px;
    width: auto;
    object-fit: contain;
    opacity: 0.6;
    filter: grayscale(100%) contrast(1.2);
    mix-blend-mode: multiply;
    transition: all 0.4s ease;
    cursor: pointer;
}

.client-logo-img:hover {
    opacity: 1;
    filter: grayscale(0%) contrast(1);
    transform: scale(1.1);
}

@media (max-width: 768px) {
    .client-logo-img {
        height: 50px;
    }

    .clients-logo-grid {
        gap: 25px 30px;
    }
}

/* Continuous Scrolling Testimonials Section */
.testimonials-section {
    padding: 100px 0;
    background-color: var(--primary);
    /* Deep Navy */
    color: var(--white);
    position: relative;
    overflow: hidden;
}

/* Dot-grid background pattern */
.testimonials-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(circle, rgba(153, 204, 51, 0.08) 1px, transparent 1px),
        radial-gradient(circle, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
    background-size: 40px 40px, 20px 20px;
    background-position: 0 0, 10px 10px;
    pointer-events: none;
    z-index: 0;
}

/* Subtle diagonal lines overlay */
.testimonials-section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(135deg,
            transparent,
            transparent 50px,
            rgba(153, 204, 51, 0.02) 50px,
            rgba(153, 204, 51, 0.02) 51px);
    pointer-events: none;
    z-index: 0;
}

.testimonials-header {
    text-align: center;
    margin-bottom: 60px;
    padding: 0 40px;
    position: relative;
    z-index: 1;
}

.testimonials-header .section-title {
    font-size: 2rem;
    color: var(--white) !important;
    margin-bottom: 10px;
}

.testimonials-header .section-subtitle {
    font-size: 1.2rem;
    color: var(--accent);
    font-weight: 600;
}

.testimonials-marquee-wrapper {
    position: relative;
    width: 100vw;
    display: flex;
    flex-direction: column;
    gap: 30px;
    z-index: 1;
    /* Soft fade on left/right edges */
    mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
}

.testimonial-row {
    width: 100vw;
    overflow: hidden;
    position: relative;
}

.testimonial-track {
    display: flex;
    width: max-content;
    gap: 30px;
    padding: 10px 0;
    /* Room for hover shadows */
}

.track-left {
    animation: scroll-left-continuous 40s linear infinite;
}

.track-right {
    animation: scroll-right-continuous 40s linear infinite;
    /* Start half-way shifted to ensure it doesn't look identical to row 1 */
    transform: translateX(-50%);
}

.testimonial-track:hover {
    animation-play-state: paused;
}

.testimonials-section .testimonial-card {
    background: rgba(255, 255, 255, 0.07);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    padding: 40px;
    width: 450px;
    flex-shrink: 0;
    position: relative;
    transition: transform 0.4s ease, box-shadow 0.4s ease, background 0.4s ease;
    color: var(--white);
}

.testimonials-section .testimonial-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.testimonials-section .quote-icon {
    position: absolute;
    top: 20px;
    right: 30px;
    font-family: serif;
    font-size: 5rem;
    line-height: 1;
    color: var(--accent);
    opacity: 0.25;
}

.testimonials-section .testimonial-text {
    font-size: 1.15rem;
    line-height: 1.7;
    margin-bottom: 30px;
    color: #e2e8f0 !important;
    position: relative;
    z-index: 2;
    font-weight: 400;
    letter-spacing: 0.01em;
}

.testimonials-section .testimonial-author {
    display: flex;
    flex-direction: column;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    padding-top: 20px;
}

.testimonials-section .testimonial-author strong {
    font-size: 1.1rem;
    color: var(--accent);
    margin-bottom: 5px;
}

.testimonials-section .testimonial-author span {
    font-size: 0.9rem;
    color: #94a3b8;
}

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

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

@keyframes scroll-right-continuous {
    0% {
        transform: translateX(-50%);
    }

    100% {
        transform: translateX(0%);
    }
}

@media (max-width: 768px) {
    .testimonials-section .testimonial-card {
        width: 320px;
        padding: 30px;
    }

    .testimonials-section .testimonial-text {
        font-size: 1rem;
    }
}

/* Marquee Section */
.marquee-section {
    position: relative;
    padding: 100px 0;
    background-color: var(--primary);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.marquee-wrapper {
    width: 120vw;
    margin-left: -10vw;
    display: flex;
    background: var(--accent);
    color: var(--primary);
    padding: 15px 0;
    margin-bottom: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.marquee-wrapper.rotate-left {
    transform: rotate(-3deg);
    z-index: 2;
}

.marquee-wrapper.rotate-right {
    transform: rotate(3deg);
    background: var(--white);
    color: var(--primary);
    margin-top: -60px;
    z-index: 1;
}

.marquee-content {
    display: flex;
    white-space: nowrap;
    animation: scroll-left 30s linear infinite;
    font-size: 3.5rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.marquee-content.reverse {
    animation: scroll-right 30s linear infinite;
}

.marquee-content span {
    padding: 0 20px;
}

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

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

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

    100% {
        transform: translateX(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .marquee-content {
        animation-play-state: paused !important;
    }
}

/* Global Footprint Section */
.global-footprint-section {
    position: relative;
    padding: 120px 40px;
    background-color: var(--white);
    overflow: hidden;
    color: var(--primary);
}

.ambient-grid-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 200%;
    height: 200%;
    background-image:
        linear-gradient(rgba(11, 37, 69, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(11, 37, 69, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    transform: perspective(500px) rotateX(60deg) translateY(-100px) translateZ(-200px);
    animation: gridMove 20s linear infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes gridMove {
    0% {
        transform: perspective(500px) rotateX(60deg) translateY(0) translateZ(-200px);
    }

    100% {
        transform: perspective(500px) rotateX(60deg) translateY(50px) translateZ(-200px);
    }
}

.footprint-header-center {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 60px auto;
    position: relative;
    z-index: 2;
}

.footprint-header-center .section-subtitle {
    font-size: 1.2rem;
    color: var(--accent);
    margin-bottom: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.footprint-header-center .section-title {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 20px;
}

.footprint-header-center .section-description {
    font-size: 1.1rem;
    color: #555;
    line-height: 1.6;
}

/* Map Network Container */
.map-network-container {
    position: relative;
    width: 100%;
    max-width: 1000px;
    height: 500px;
    margin: 0 auto;
    background-color: #0b2545;
    /* Dark navy */
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(11, 37, 69, 0.2);
    z-index: 2;
}

/* Abstract Grid Background for Map */
.map-grid-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 40px 40px;
    /* Map outline approximation using radial gradients for a tech feel */
    background-color: #0b2545;
}

/* Real World Map Image */
.real-world-map {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    height: auto;
    max-height: 90%;
    object-fit: contain;
    z-index: 1;
    pointer-events: none;
    opacity: 0.15;
    /* Make it subtle so markers pop */
    filter: invert(1) sepia(1) hue-rotate(180deg) brightness(2) contrast(0.5);
    /* Colorize to match the blue theme */
}

/* Map Markers */
.map-marker {
    position: absolute;
    width: 30px;
    height: 30px;
    transform: translate(-50%, -50%);
    cursor: pointer;
    z-index: 10;
}

.marker-dot {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 12px;
    height: 12px;
    background-color: var(--accent);
    /* Lime green */
    border-radius: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 10px var(--accent);
    transition: transform 0.3s ease;
    z-index: 2;
}

.marker-pulse {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    background-color: rgba(153, 204, 51, 0.4);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: markerPulse 2s infinite cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
}

@keyframes markerPulse {
    0% {
        transform: translate(-50%, -50%) scale(0.5);
        opacity: 1;
    }

    100% {
        transform: translate(-50%, -50%) scale(2.5);
        opacity: 0;
    }
}

.marker-tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background-color: var(--white);
    color: var(--primary);
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 700;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
    pointer-events: none;
    z-index: 3;
}

.marker-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 6px;
    border-style: solid;
    border-color: var(--white) transparent transparent transparent;
}

.map-marker:hover .marker-dot {
    transform: translate(-50%, -50%) scale(1.5);
}

.map-marker:hover .marker-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-10px);
}

/* (Old testimonials CSS removed — using new continuous scrolling styles above) */

/* Leadership & Management Team */
.leadership-team-section {
    padding: 100px 40px;
    background-color: var(--white);
    text-align: center;
}

.team-header {
    margin-bottom: 60px;
}

.team-header .section-title {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 10px;
}

.team-header .section-subtitle {
    font-size: 1.2rem;
    color: var(--accent);
    font-weight: 600;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 30px;
    max-width: 1000px;
    margin: 0 auto;
    perspective: 1000px;
}

.team-card-wrapper {
    position: relative;
    width: 100%;
    height: 320px;
    perspective: 1000px;
    transform-style: preserve-3d;
}

.team-card {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    border-radius: 15px;
    transition: transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
    will-change: transform;
}

/* Layer 1: Base */
.team-card-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(11, 37, 69, 0.03), rgba(11, 37, 69, 0.08));
    border-radius: 15px;
    transform: translateZ(0);
    /* Base layer */
    box-shadow: inset 0 0 0 1px rgba(11, 37, 69, 0.1);
    transition: box-shadow 0.4s ease;
}

.team-card-wrapper:hover .team-card-bg {
    box-shadow: inset 0 0 0 2px var(--accent), 0 15px 35px rgba(153, 204, 51, 0.15);
}

/* Layer 2: Image */
.team-card-img-wrapper {
    position: absolute;
    inset: 0;
    display: block;
    overflow: hidden;
    border-radius: 15px;
    transform: translateZ(10px);
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.6s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.team-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform-origin: center center;
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

.team-card-wrapper:hover .team-card-img-wrapper {
    transform: translateZ(20px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.team-card-wrapper:hover .team-card-img {
    transform: scale(1.08);
}

/* Layer 3: Info Overlay */
.team-card-info {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    box-sizing: border-box;
    padding: 15px 15px;
    background: rgba(11, 37, 69, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom-left-radius: 15px;
    border-bottom-right-radius: 15px;
    color: var(--white);
    transform: translateZ(30px) translateY(10px);
    opacity: 0;
    transition: all 0.6s cubic-bezier(0.25, 1, 0.5, 1);
    transform-style: preserve-3d;
}

.team-card-wrapper:hover .team-card-info {
    opacity: 1;
    transform: translateZ(60px) translateY(0);
}

.team-card-info h4 {
    margin: 0 0 5px 0;
    font-size: 1.1rem;
    font-weight: 700;
}

.team-title {
    display: block;
    font-size: 0.85rem;
    color: var(--accent);
    margin-bottom: 8px;
}

.linkedin-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background-color: var(--accent);
    color: var(--primary);
    border-radius: 4px;
    font-weight: bold;
    text-decoration: none;
    font-size: 0.8rem;
    transition: background-color 0.3s ease;
}

.linkedin-link:hover {
    background-color: var(--white);
}

/* Mobile Fallback for Leadership */
@media (max-width: 1000px) {
    .team-card-wrapper {
        perspective: none;
        height: auto;
        min-height: 400px;
    }

    .team-card {
        transform: none !important;
    }

    .team-card-info {
        opacity: 1;
        transform: none !important;
        position: relative;
        background: var(--primary);
        border-radius: 0 0 15px 15px;
    }

    .team-card-img-wrapper {
        position: relative;
        transform: none !important;
        height: 300px;
        background: linear-gradient(135deg, rgba(11, 37, 69, 0.03), rgba(11, 37, 69, 0.08));
        border-radius: 15px 15px 0 0;
    }

    .team-card-bg {
        display: none;
    }
}

/* Footer */
.main-footer {
    background-color: var(--primary);
    color: var(--white);
    padding: 80px 40px;
    position: relative;
    overflow: hidden;
    margin-top: auto;
    /* Soft top shadow to simulate depth */
    box-shadow: inset 0 20px 40px rgba(0, 0, 0, 0.15);
}

.footer-bg-parallax {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

/* Abstract textless box silhouettes */
.parallax-box {
    position: absolute;
    border: 2px solid rgba(255, 255, 255, 0.05);
    background: rgba(255, 255, 255, 0.02);
    transform-style: preserve-3d;
    border-radius: 8px;
    will-change: transform;
}

.box1 {
    width: 300px;
    height: 300px;
    top: -50px;
    right: 10%;
    transform: rotate(-15deg);
}

.box2 {
    width: 400px;
    height: 400px;
    bottom: -100px;
    left: -50px;
    transform: rotate(10deg);
}

.box3 {
    width: 150px;
    height: 150px;
    top: 30%;
    left: 30%;
    transform: rotate(45deg);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    position: relative;
    z-index: 2;
    max-width: 1200px;
    margin: 0 auto;
}

.brand-col h3 {
    font-size: 1.8rem;
    margin: 0 0 10px 0;
    color: var(--accent);
}

.social-col {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.social-link {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--white);
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 500;
    perspective: 800px;
    /* 3D perspective for rotation */
    width: fit-content;
}

.social-icon {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1rem;
    color: var(--accent);
    transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1),
        background 0.3s, color 0.3s;
    transform-style: preserve-3d;
    will-change: transform;
}

.social-link:hover .social-icon,
.social-link:focus-visible .social-icon {
    transform: rotateY(360deg) scale(1.1);
    background: var(--accent);
    color: var(--primary);
}

.social-link:hover .social-text {
    color: var(--accent);
    text-decoration: underline;
}

.contact-col p {
    margin: 10px 0;
    font-size: 1.1rem;
}

.contact-col a {
    color: var(--white);
    text-decoration: none;
    transition: color 0.3s;
}

.contact-col a:hover,
.contact-col a:focus-visible {
    color: var(--accent);
}

.floating-contact {
    position: fixed;
    bottom: 40px;
    right: 40px;
    z-index: 1000;
    /* Ultra-gentle slow 3D idle breathing animation (sine-wave easing up and down by max 5px over 4s) */
    animation: slow-breathe 4s ease-in-out infinite;
    will-change: transform;
}

.chat-bubble-inner {
    background: var(--accent);
    color: var(--primary);
    padding: 16px 24px;
    border-radius: 30px;
    font-weight: 700;
    border: none;
    box-shadow: 0 10px 25px rgba(11, 37, 69, 0.3);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
    transition: background-color 0.3s, transform 0.3s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.3s;
    will-change: transform;
}

.floating-contact:hover .chat-bubble-inner,
.floating-contact:focus-within .chat-bubble-inner {
    background-color: #A3D936;
    transform: scale(1.05);
    box-shadow: 0 15px 35px rgba(11, 37, 69, 0.4);
}

.chat-bubble-inner:active {
    transform: scale(0.98);
}

@keyframes slow-breathe {
    0% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-5px);
    }

    100% {
        transform: translateY(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
        transform: none !important;
    }
}

@media (max-width: 900px) {
    .main-header {
        flex-direction: column;
        gap: 20px;
        position: relative;
        /* Un-fix on mobile if it gets too tall */
    }

    .desktop-nav {
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }

    .social-col {
        align-items: center;
    }

    .social-link {
        justify-content: center;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .floating-contact {
        bottom: 20px;
        right: 20px;
    }
}

/* Active navigation link highlight */
.nav-links li a.active {
    color: var(--accent) !important;
    font-weight: 700;
}

/* ==========================================================================
   GLOBAL TYPOGRAPHY SYSTEM
   (Controls all font families, font weights, and sizes centrally)
   ========================================================================== */

/* Main Headings */
.hero-heading,
.section-heading,
.cards-header-row .section-heading,
.about-heading,
.section-title {
    font-family: var(--font-headings) !important;
    font-weight: 700 !important;
    letter-spacing: -0.03em !important;
    line-height: 1.15 !important;
}

/* Responsive heading size overrides */
/* Desktop screens: 3.2rem */
.hero-heading,
.section-heading,
.cards-header-row .section-heading,
.about-heading,
.section-title {
    font-size: 3.2rem !important;
}

/* Tablet screens: 2.6rem */
@media (max-width: 992px) {

    .hero-heading,
    .section-heading,
    .cards-header-row .section-heading,
    .about-heading,
    .section-title {
        font-size: 2.6rem !important;
    }
}

/* Mobile screens: 2.0rem */
@media (max-width: 576px) {

    .hero-heading,
    .section-heading,
    .cards-header-row .section-heading,
    .about-heading,
    .section-title {
        font-size: 2.0rem !important;
    }
}

/* Main Paragraph Elements across all components */
.about-revamp-container p,
.about-revamp-container .section-desc,
.about-revamp-container .competency-desc,
.about-revamp-container .minimal-card p,
.about-revamp-container .value-card p,
.about-revamp-container .award-card p {
    font-family: var(--font-body) !important;
    font-size: 1.05rem !important;
    font-weight: 400 !important;
    line-height: 1.65 !important;
    color: var(--text-mid) !important;
}