:root {
    --bg-color: #05070a;
    --primary-color: #00f2ff;
    --secondary-color: #0a1128;
    --accent-color: #bc13fe;
    --text-color: #ffffff;
    --text-muted: #a0a0a0;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-bg-dark: rgba(5, 7, 10, 0.8);
    --glass-border: rgba(255, 255, 255, 0.1);
    --font-heading: 'Orbitron', 'Playfair Display', serif;
    --font-body: 'Inter', 'Space Grotesk', sans-serif;
    --neon-glow: 0 0 10px rgba(0, 242, 255, 0.5), 0 0 20px rgba(0, 242, 255, 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent; /* Remove grey tap flash on mobile */
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%; /* Prevent font scaling on rotation */
    text-size-adjust: 100%;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    overscroll-behavior-y: none; /* Prevent pull-to-refresh ruining the fluid feel */
    /* iOS safe area for notch/home bar */
    padding-bottom: env(safe-area-inset-bottom);
}

h1,
h2,
h3 {
    font-family: var(--font-heading);
    letter-spacing: 2px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

#bg-image {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: url('bg.png') no-repeat center center/cover;
    opacity: 1.0;
    filter: brightness(0.7) contrast(1.1) blur(9px);
    /* Reduced brightness and contrast */
    z-index: -3;
}

#matrix-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -2;
    opacity: 0.6;
    /* Adjust as needed */
}

#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    background-color: transparent;
    /* Make canvas background transparent */
}

/* ===========================
   MOBILE-NATIVE TOUCH TARGETS
=========================== */
a, button, [role="button"] {
    min-height: 44px; /* Apple HIG minimum tap target */
    min-width: 44px;
    touch-action: manipulation; /* Eliminate 300ms tap delay */
}

input, textarea, select {
    font-size: 16px; /* Prevents iOS zoom on focus */
    touch-action: manipulation;
}

.glass-card {
    background: var(--glass-bg-dark);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 15px;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.glass-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary-color);
}

.neon-text {
    color: var(--primary-color);
    text-shadow: var(--neon-glow);
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--bg-color);
}

.btn-primary:hover {
    box-shadow: var(--neon-glow);
    transform: scale(1.05);
}

/* Header & Nav */
header {
    padding: 20px 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 100;
    background: rgba(5, 7, 10, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #fff;
}

.logo span {
    color: var(--primary-color);
}

.nav-links a {
    color: var(--text-color);
    text-decoration: none;
    margin-left: 30px;
    font-family: var(--font-heading);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    position: relative;
    padding-bottom: 4px;
    transition: color 0.3s, text-shadow 0.3s;
}

/* Animated neon underline sweep on hover */
.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0%;
    height: 2px;
    background: var(--primary-color);
    box-shadow: 0 0 8px var(--primary-color);
    border-radius: 2px;
    transition: width 0.3s ease;
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary-color);
    text-shadow: 0 0 8px rgba(0, 242, 255, 0.7);
}


.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    z-index: 1001;
}

.menu-toggle span {
    width: 30px;
    height: 3px;
    background-color: var(--text-color);
    border-radius: 3px;
    transition: all 0.3s ease;
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 6px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -5px);
}

.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 70%;
    height: 100vh;
    background: var(--glass-bg-dark);
    backdrop-filter: blur(15px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 40px;
    transition: 0.5s ease;
    z-index: 1000;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.5);
    border-left: 1px solid var(--glass-border);
}

.mobile-menu a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: 600;
    text-transform: uppercase;
    font-family: var(--font-heading);
    letter-spacing: 2px;
    transition: 0.3s;
}

.mobile-menu a:hover {
    color: var(--primary-color);
}

.mobile-menu.active {
    right: 0;
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    text-align: center;
    padding-top: 80px;
}

.tagline {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 3px;
}

.main-title {
    font-size: 5rem;
    line-height: 1.1;
    margin-bottom: 30px;
    font-weight: 700;
}

.hero-desc {
    max-width: 650px;
    margin: 0 auto 40px;
    font-size: 1.2rem;
    color: var(--text-muted);
}

.hero-btns {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    background: rgba(0, 242, 255, 0.1);
    box-shadow: var(--neon-glow);
}

/* Services Section */
.services {
    padding: 100px 0;
}

.section-title {
    text-align: center;
    font-size: 3rem;
    margin-bottom: 60px;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.service-card {
    padding: 50px 30px;
    text-align: center;
}

.service-icon {
    font-size: 3.5rem;
    margin-bottom: 25px;
    display: block;
}

.service-card h3 {
    margin-bottom: 15px;
    font-size: 1.5rem;
    color: var(--primary-color);
}

.service-card p {
    color: var(--text-muted);
}

/* Projects Section */
.projects {
    padding: 100px 0;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.project-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.project-image, 
.project-gallery {
    height: 220px;
    background: rgba(0, 242, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid var(--glass-border);
    border-top: 1px solid var(--glass-border);
    overflow: hidden;
    width: 100%;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

/* Slider Styles */
.slider-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.slide-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.slide-img.active {
    opacity: 1;
}

.project-card:hover .project-image img {
    transform: scale(1.1);
}

.project-content {
    padding: 25px;
    text-align: left;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.project-content h3 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.project-content p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 20px;
    flex-grow: 1;
}

.tech-stack {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.tech-stack span {
    font-size: 0.8rem;
    color: var(--primary-color);
    background: rgba(0, 242, 255, 0.1);
    padding: 5px 10px;
    border-radius: 20px;
    border: 1px solid rgba(0, 242, 255, 0.2);
}

/* Reviews Section */
.reviews {
    padding: 100px 0;
}

.reviews-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.review-card {
    padding: 40px 30px;
    text-align: left;
    position: relative;
    overflow: hidden;
}

.quote-icon {
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 6rem;
    font-family: var(--font-heading);
    color: rgba(0, 242, 255, 0.1);
    line-height: 1;
    user-select: none;
}

.review-text {
    font-style: italic;
    color: var(--text-color);
    margin-bottom: 30px;
    font-size: 1.05rem;
    position: relative;
    z-index: 1;
}

.client-info {
    display: flex;
    align-items: center;
    gap: 15px;
    border-top: 1px solid var(--glass-border);
    padding-top: 20px;
}

.client-avatar {
    width: 45px;
    height: 45px;
    background: rgba(0, 242, 255, 0.15);
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
}

.client-details h4 {
    font-size: 1.1rem;
    margin-bottom: 2px;
}

.client-details p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Logo Marquee Section */
.logo-marquee {
    padding: 60px 0;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid var(--glass-border);
    border-bottom: 1px solid var(--glass-border);
    margin-bottom: 100px;
}

.marquee-title {
    text-align: center;
    font-family: var(--font-heading);
    color: var(--text-muted);
    margin-bottom: 40px;
    font-size: 1.1rem;
    letter-spacing: 3px;
    text-transform: uppercase;
}

.marquee-container {
    width: 100%;
    overflow: hidden;
    display: flex;
}

.marquee-track {
    display: flex;
    width: fit-content;
    animation: scrollMarquee 35s linear infinite forwards;
}

.marquee-logo {
    height: 90px;
    width: auto;
    margin: 0 60px;
    opacity: 0.4;
    transition: all 0.3s;
    filter: grayscale(100%);
    cursor: default;
}

.marquee-logo:hover {
    opacity: 1;
    filter: grayscale(0%) drop-shadow(0 0 15px rgba(0, 242, 255, 0.4));
    transform: scale(1.05);
}

@keyframes scrollMarquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* Team Section */
.team {
    padding: 100px 0;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    justify-items: center;
}

.team-card {
    padding: 40px;
    text-align: center;
    width: 100%;
}

.team-image {
    width: 180px;
    height: 180px;
    margin: 0 auto 25px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--primary-color);
    box-shadow: var(--neon-glow);
}

.team-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.team-card h3 {
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.team-role {
    color: var(--primary-color);
    font-weight: 600;
    font-family: var(--font-heading);
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
    margin-bottom: 5px;
}

.team-subtitle {
    color: var(--text-muted);
    font-size: 0.8rem;
    font-family: var(--font-body);
    font-style: italic;
    letter-spacing: 1px;
}

/* Contact Section */
.contact {
    padding: 120px 0;
}

.contact-card {
    padding: 60px 40px;
    max-width: 1000px;
    margin: 0 auto;
}

.contact-content-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
    text-align: left;
}

.contact-text h2 {
    font-size: 3.5rem;
    margin-bottom: 20px;
}

.contact-text p {
    font-size: 1.1rem;
    color: var(--text-muted);
}

.contact-info {
    margin-top: 40px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.contact-item {
    color: var(--text-color);
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 500;
    transition: all 0.3s;
    padding: 12px 20px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    display: inline-flex;
    align-items: center;
    width: fit-content;
}

.contact-item:hover {
    color: var(--primary-color);
    background: rgba(0, 242, 255, 0.05);
    border-color: var(--primary-color);
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 242, 255, 0.1);
}

.contact-form {
    background: rgba(0, 0, 0, 0.2);
    padding: 35px;
    border-radius: 15px;
    border: 1px solid var(--glass-border);
}

.form-group {
    margin-bottom: 20px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 15px;
    background: rgba(10, 17, 40, 0.6);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: var(--text-color);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: all 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 10px rgba(0, 242, 255, 0.2);
}

.form-group textarea {
    resize: vertical;
}

.contact-form .btn {
    width: 100%;
    font-size: 1.1rem;
}

footer {
    padding: 60px 0;
    text-align: center;
    border-top: 1px solid var(--glass-border);
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-content {
    animation: fadeInUp 1.2s ease-out forwards;
}

/* Scroll Snap */
html {
    scroll-behavior: smooth;
}

/* Responsive */
@media (max-width: 992px) {
    .main-title {
        font-size: 4rem;
    }
}

@media (max-width: 768px) {
    .main-title {
        font-size: 3rem;
    }

    .nav-links {
        display: none;
    }

    .menu-toggle {
        display: flex;
    }

    .contact-content-wrapper {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 30px;
    }

    .contact-info {
        align-items: center;
    }

    .contact-text h2 {
        font-size: 2.5rem;
    }
    
    .contact-form {
        padding: 25px;
    }

    .hero {
        height: auto;
        padding: 150px 0 100px;
    }
}

/* ===========================
   FOOTER
=========================== */
footer.footer {
    background: rgba(0, 0, 0, 0.6);
    border-top: 1px solid var(--glass-border);
    padding: 50px 0 30px;
    backdrop-filter: blur(10px);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
    flex-wrap: wrap;
}

.footer-info .logo {
    font-size: 2rem;
    margin-bottom: 10px;
}

.footer-info p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    max-width: 400px;
    line-height: 1.7;
}

.footer-links {
    text-align: right;
}

.footer-links p {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 5px;
}

@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    .footer-links {
        text-align: center;
    }
}