:root {
    --primary-red: #e72c2d;
    --dark-red: #a01010;
    --bg-black: #050505;
    --text-white: #FFFFFF;
    --text-gray: #CCCCCC;
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-black);
    color: var(--text-white);
    font-family: 'Century Gothic', 'CenturyGothic', AppleGothic, sans-serif;
    overflow-x: hidden;
    position: relative;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

/* Canvas for Three.js (Background) */
#canvas-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    /* Behind content but in front of body bg */
    pointer-events: none;
    mix-blend-mode: screen;
    /* Helps visibility on dark bg */
}

/* Content Wrapper to sit above canvas */
.hero,
.services,
.projects,
.blog,
footer,
header {
    position: relative;
    z-index: 10;
}

/* Layout Utilities */
.container {
    width: 90%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
}

/* Header & Nav */
header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 20px 0;
    background: rgba(5, 5, 5, 0.6);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.4s ease;
}

header.scrolled {
    padding: 10px 0;
    background: rgba(5, 5, 5, 0.95);
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header .logo img {
    height: 120px;
    width: auto;
    filter: drop-shadow(0 0 15px rgba(231, 44, 45, 0.4));
    transition: transform 0.3s ease;
    display: block;
}

header .logo img:hover {
    transform: scale(1.05);
}

/* Navigation Links - Desktop */
.nav-links ul {
    list-style: none;
    display: flex;
    gap: 15px;
    align-items: center;
}

.nav-links a {
    font-weight: 600;
    font-size: 0.95rem;
    padding: 10px 25px;
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid transparent;
    color: white;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 10px;
    /* Space between icon and text */
}

/* Icon specific alignment */
nav a i {
    font-size: 1.1rem;
    transition: transform 0.3s ease;
}

nav a:hover i {
    transform: rotate(-10deg) scale(1.1);
}

.nav-links a:hover,
.nav-links a.active {
    background: var(--primary-red);
    color: white;
    box-shadow: 0 5px 15px rgba(231, 44, 45, 0.4);
    transform: translateY(-2px);
}

/* Hamburger Menu - HIDDEN ON DESKTOP */
.hamburger {
    display: none;
    /* Critical Fix */
    font-size: 2rem;
    color: white;
    cursor: pointer;
    z-index: 1100;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    text-align: left;
    padding-top: 120px;
    padding-bottom: 50px;
    position: relative;
    overflow: hidden;
}

.hero h1 {
    font-size: 5rem;
    font-weight: 900;
    line-height: 1.05;
    margin-bottom: 25px;
    letter-spacing: -2px;
}

.hero p {
    font-size: 1.4rem;
    color: var(--text-gray);
    max-width: 700px;
    margin-bottom: 50px;
    font-weight: 300;
}

.highlight {
    color: var(--primary-red);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    padding: 18px 50px;
    border-radius: 50px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    position: relative;
    overflow: hidden;
    z-index: 1;
    font-size: 1rem;
    cursor: pointer;
}

.btn-primary {
    background: transparent;
    color: white;
    border: 2px solid var(--primary-red);
    box-shadow: 0 0 25px rgba(231, 44, 45, 0.2);
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: var(--primary-red);
    transition: width 0.4s ease;
    z-index: -1;
}

.btn-primary:hover::before {
    width: 100%;
}

.btn-primary:hover {
    box-shadow: 0 10px 40px rgba(231, 44, 45, 0.6);
    transform: translateY(-5px);
    border-color: var(--primary-red);
}

/* Services Grid & Cards */
.services {
    padding: 100px 0;
}

.section-title {
    font-size: 3rem;
    margin-bottom: 80px;
    text-align: left;
}

.section-title span {
    color: var(--primary-red);
    font-size: 5rem;
    font-weight: 900;
    display: block;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.service-card {
    background: rgba(10, 10, 10, 0.6);
    border: 1px solid var(--glass-border);
    border-radius: 30px;
    position: relative;
    height: 450px;
    overflow: hidden;
    transition: all 0.5s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 40px;
}

.service-card:hover {
    background: rgba(231, 44, 45, 0.1);
    border-color: var(--primary-red);
    transform: translateY(-15px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.service-card .service-icon {
    font-size: 4rem;
    color: var(--primary-red);
    margin-bottom: 20px;
    transition: all 0.5s ease;
}

.service-card:hover .service-icon {
    transform: translateY(-30px) scale(0.8);
    color: white;
}

.service-card h3 {
    font-size: 1.8rem;
    font-weight: 700;
    transition: all 0.5s ease;
    z-index: 2;
    margin: 0;
    width: 100%;
}

.service-card:hover h3 {
    transform: translateY(-30px);
    color: var(--primary-red);
}

.service-card p {
    color: var(--text-gray);
    line-height: 1.6;
    font-size: 1.1rem;
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.5s ease;
    position: absolute;
    bottom: 40px;
    left: 20px;
    right: 20px;
}

.service-card:hover p {
    opacity: 1;
    transform: translateY(0);
}

/* Animations */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.delay-1 {
    animation-delay: 0.2s;
}

.delay-4 {
    animation-delay: 0.8s;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Auto Scroll & Tilt */
.auto-scroll-wrapper {
    width: 100%;
    overflow: hidden;
    position: relative;
    padding: 40px 0;
    mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
}

.auto-scroll-track {
    display: flex;
    width: max-content;
    gap: 40px;
    animation: scrollGeneric 30s linear infinite;
}

.auto-scroll-wrapper:hover .auto-scroll-track {
    animation-play-state: paused;
}

@keyframes scrollGeneric {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(calc(-50% - 20px));
    }
}

.tilt-card {
    flex: 0 0 320px;
    height: 450px;
    position: relative;
    perspective: 1000px;
}

.tilt-inner {
    width: 100%;
    height: 100%;
    background: rgba(15, 15, 15, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    transform-style: preserve-3d;
    transform: translateZ(0);
    transition: transform 0.1s ease-out;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.project-image,
.blog-image {
    width: 100%;
    height: 55%;
    background-size: cover;
    background-position: center;
}

.project-content,
.blog-content {
    height: 45%;
    padding: 25px;
    background: linear-gradient(to top, #000, #111);
    display: flex;
    flex-direction: column;
    text-align: left;
    transform: translateZ(20px);
}

.tilt-inner h3 {
    font-size: 1.4rem;
    color: white;
    margin: 10px 0;
}

.tilt-inner p {
    font-size: 0.9rem;
    color: #bbb;
}

.tilt-inner .project-category {
    color: var(--primary-red);
    font-weight: bold;
    font-size: 0.8rem;
    text-transform: uppercase;
}

.blog-date {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--primary-red);
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.8rem;
}

.read-more {
    margin-top: auto;
    color: white;
    font-weight: 600;
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: flex-end;
}

/* References */
.brand-wrapper {
    width: 100%;
    overflow: hidden;
    padding: 20px 0;
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.brand-carousel {
    display: flex;
    width: max-content;
    gap: 80px;
    animation: scrollBrands 30s linear infinite;
}

.reference-item i {
    font-size: 3rem;
    color: white;
    opacity: 0.5;
    transition: 0.3s;
}

.reference-item:hover i {
    opacity: 1;
    filter: drop-shadow(0 0 10px rgba(231, 44, 45, 0.6));
}

@keyframes scrollBrands {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* Footer */
footer {
    padding: 80px 0 40px;
    border-top: 1px solid var(--glass-border);
    margin-top: 50px;
    background: linear-gradient(to top, rgba(5, 5, 5, 1), transparent);
}

footer .logo img {
    height: 120px;
    margin-bottom: 20px;
    opacity: 0.8;
}

footer .logo img:hover {
    opacity: 1;
}

/* ========================================= */
/* === RESPONSIVE & MOBILE OPTIMIZATIONS === */
/* ========================================= */

@media (max-width: 992px) {

    /* Navbar & Header */
    .hamburger {
        display: block !important;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        /* Force Full Width */
        height: 100vh;
        max-width: none;
        /* Remove any restriction */
        background: #000000;
        /* SOLID BLACK - No Transparency */
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: right 0.4s ease;
        /* Slide effect from right */
        z-index: 1000;
        /* High Z-Index */
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links ul {
        flex-direction: column;
        gap: 30px;
    }

    .nav-links a {
        font-size: 1.2rem;
    }

    /* Hero */
    .hero {
        align-items: center;
        justify-content: center;
        text-align: center;
        padding-top: 150px;
    }

    .hero h1 {
        font-size: 2.8rem;
    }

    .hero p {
        font-size: 1.1rem;
        padding: 0 10px;
    }

    .btn {
        width: 100%;
        max-width: 300px;
    }

    /* Grid Layouts */
    .services-grid {
        grid-template-columns: 1fr;
        /* Single Column */
        gap: 30px;
    }

    .section-title {
        font-size: 2.5rem;
        text-align: center;
    }

    .section-title span {
        font-size: 3.5rem;
    }

    /* Global Container */
    .container {
        padding: 0 20px;
    }

    header .logo img {
        height: 90px;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 2.2rem;
    }

    .section-title span {
        font-size: 3rem;
    }

    .tilt-card {
        flex: 0 0 280px;
        /* Smaller cards */
        height: 400px;
    }
}

/* Animations Helper */
.reveal-type .char {
    display: inline-block;
}