/* Global Variables */
:root {
    --bg-dark: #050511;
    --bg-darker: #02020a;
    --primary-accent: #00f3ff;
    --secondary-accent: #bd00ff;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-white: #ffffff;
    --text-gray: #b3b3b3;
    --font-heading: 'Orbitron', sans-serif;
    --font-body: 'Outfit', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

html {
    scroll-snap-type: y proximity;
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-white);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* Noise Texture Overlay */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: url('https://grainy-gradients.vercel.app/noise.svg');
    opacity: 0.05;
    pointer-events: none;
    z-index: 9999;
    filter: contrast(120%) brightness(120%);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-darker);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, var(--primary-accent), var(--secondary-accent));
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-accent);
}

/* Typography */
h1,
h2,
h3,
.logo-text {
    font-family: var(--font-heading);
    text-transform: uppercase;
    letter-spacing: 1px;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

.gradient-text {
    background: linear-gradient(90deg, var(--primary-accent), var(--secondary-accent));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
    /* Removed 'left: 50%' and 'transform' which might cause centering/cutoff issues on some viewports if parent isn't relative or has padding issues */
    display: block;
    width: 100%;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--primary-accent);
    margin: 10px auto 0;
    box-shadow: 0 0 10px var(--primary-accent);
}

/* Glassmorphism Utilities */
.glass-header,
.glass-card,
.glass-panel {
    background: rgba(255, 255, 255, 0.03);
    /* Lighter base for liquid feel */
    backdrop-filter: blur(25px);
    /* Much stronger blur for liquid look */
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    /* Softer border */
    border-radius: 12px;
    position: relative;
    overflow: hidden;
    transition: background 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-header {
    border-radius: 0;
    border-top: none;
    border-left: none;
    border-right: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    background: rgba(5, 5, 17, 0.7);
    z-index: 10000;
}

.glass-card:hover {
    background: rgba(255, 255, 255, 0.06);
}

/* Gradient Border Effect */
.gradient-border {
    position: relative;
    border: none !important;
}

.gradient-border::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 12px;
    padding: 1px;
    /* Border thickness */
    background: linear-gradient(135deg, var(--primary-accent), transparent, var(--secondary-accent));
    -webkit-mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

/* Cursor Glow utility */
.cursor-glow {
    position: absolute;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(0, 243, 255, 0.15) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
    transform: translate(-50%, -50%);
    transition: opacity 0.3s ease;
    opacity: 0;
}

.glass-card:hover .cursor-glow {
    opacity: 1;
}

/* HUD Scanning Line */
.hud-scanner {
    will-change: transform;
}

@keyframes scanning {
    0% {
        transform: translateY(-2%);
    }

    100% {
        transform: translateY(100vh);
    }
}

/* Liquid Background Orbs */
.liquid-orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    z-index: -1;
    opacity: 0.15;
    pointer-events: none;
    will-change: transform;
    animation: liquid-float 20s infinite alternate cubic-bezier(0.445, 0.05, 0.55, 0.95);
}

@keyframes liquid-float {
    0% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(10vw, 5vh) scale(1.1);
    }

    66% {
        transform: translate(-5vw, 15vh) scale(0.9);
    }

    100% {
        transform: translate(5vw, -10vh) scale(1.05);
    }
}

#orb-1 {
    width: 40vw;
    height: 40vw;
    background: var(--primary-accent);
    top: -10%;
    left: -10%;
}

#orb-2 {
    width: 35vw;
    height: 35vw;
    background: var(--secondary-accent);
    bottom: -10%;
    right: -10%;
    animation-delay: -5s;
}

#orb-3 {
    width: 25vw;
    height: 25vw;
    background: #008cff;
    top: 40%;
    left: 30%;
    animation-delay: -10s;
}

/* Header */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 10000;
    transition: all 0.3s ease;
}

@media (max-width: 480px) {
    header {
        padding: 0.8rem 3%;
    }
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary-accent);
}

.logo-text {
    font-size: 1.2rem;
    font-weight: 700;
}

.desktop-nav {
    display: flex;
    gap: 1.5rem;
}

.desktop-nav a {
    font-size: 0.85rem;
    font-weight: 600;
    font-family: var(--font-heading);
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 12px 24px;
    /* Increased for 44x44px minimum touch target */
    min-height: 44px;
    border-radius: 50px;
    border: 1px solid transparent;
    position: relative;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
}

.desktop-nav a:hover {
    color: var(--primary-accent);
    background: rgba(0, 243, 255, 0.05);
    border-color: rgba(0, 243, 255, 0.2);
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.1);
}

.desktop-nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--primary-accent);
    transition: width 0.3s ease;
}

.desktop-nav a:hover::after {
    width: 30%;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    min-width: 48px;
    min-height: 48px;
    /* Larger touch target for mobile */
    padding: 8px;
}

/* Mobile Nav Overlay */
.mobile-nav-overlay {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(15px);
    z-index: 10005;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: right 0.4s cubic-bezier(0.77, 0, 0.175, 1);
}

.mobile-nav-overlay.active {
    right: 0;
}

.mobile-nav-links {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.mobile-nav-links a {
    font-size: 2.5rem;
    margin: 1rem 0;
    font-family: var(--font-heading);
    color: var(--text-white);
    transition: color 0.3s ease, transform 0.3s ease;
    min-height: 56px;
    /* Comfortable touch target for mobile navigation */
    display: flex;
    align-items: center;
    padding: 0.5rem 1rem;
}

.mobile-nav-links a:hover {
    color: var(--primary-accent);
    transform: scale(1.1);
}

.close-menu-btn {
    position: absolute;
    top: 20px;
    right: 30px;
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
}

/* Hero Section */
.hero-section {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: sticky;
    top: 0;
    z-index: 0;
    overflow: hidden;
    background-image: url('hero-bg.png');
    /* Ensure this matches the generated filename/rename */
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    scroll-snap-align: start;
    scroll-margin-top: 100px;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(5, 5, 17, 0.7), var(--bg-dark));
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 800px;
    padding: 0 1rem;
    animation: fadeInUp 1s ease-out;
}

.hero-title {
    font-size: clamp(2rem, 8vw, 3.5rem);
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-gray);
    margin-bottom: 2.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-cta-container {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

@media (max-width: 500px) {
    .hero-cta-container {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }

    .primary-btn,
    .secondary-btn {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }
}

/* Buttons */
.primary-btn,
.secondary-btn {
    padding: 14px 32px;
    /* Increased for better touch accessibility */
    min-height: 48px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.primary-btn {
    background: linear-gradient(135deg, var(--primary-accent), #00aaff);
    color: #000;
    border: none;
    box-shadow: 0 0 20px rgba(0, 243, 255, 0.4);
}

.primary-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 0 30px rgba(0, 243, 255, 0.6);
}

.secondary-btn {
    background: transparent;
    border: 2px solid var(--text-white);
    color: var(--text-white);
}

.secondary-btn:hover {
    background: var(--text-white);
    color: #000;
    transform: translateY(-3px);
}

/* Services */
.services-section {
    padding: 6rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    scroll-snap-align: start;
    scroll-margin-top: 100px;
    position: relative;
    z-index: 10;
    background: var(--bg-dark);
    /* Solid background to overlap shrinking hero */
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

@media (max-width: 350px) {
    .services-grid {
        grid-template-columns: 1fr;
    }

    .service-card {
        padding: 1.5rem;
    }
}

.service-card {
    padding: 2.5rem;
    transition: transform 0.4s ease, border-color 0.4s ease;
    text-align: center;
}

.service-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary-accent);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.icon-box {
    font-size: 2.5rem;
    color: var(--primary-accent);
    margin-bottom: 1.5rem;
}

.service-card h3 {
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.service-card p {
    color: var(--text-gray);
    font-size: 0.95rem;
}

/* About Overlay Panel */
.about-section {
    max-width: 1000px;
    margin: 4rem auto;
    padding: 6rem 2rem;
    /* Increased vertical padding and reduced side padding for mobile safety */
    text-align: center;
    position: relative;
    overflow: hidden;
    width: 90%;
    /* Ensure it doesn't touch edges on small screens */
    scroll-snap-align: start;
    scroll-margin-top: 100px;
}

.about-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(189, 0, 255, 0.1) 0%, rgba(0, 0, 0, 0) 70%);
    z-index: -1;
}

.about-content p {
    font-size: 1.1rem;
    color: var(--text-gray);
    margin-bottom: 1.5rem;
}

/* Contact Section */
.contact-section {
    padding: 6rem 2rem;
    max-width: 1000px;
    margin: 0 auto;
    scroll-snap-align: start;
    scroll-margin-top: 100px;
}

.contact-container {
    display: flex;
    flex-direction: row;
    overflow: hidden;
    padding: 0;
}

.contact-form {
    flex: 2;
    padding: 3rem;
}

.contact-info {
    flex: 1;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-left: 1px solid var(--glass-border);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-gray);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: white;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-accent);
}

.contact-info h3 {
    margin-bottom: 2rem;
    font-size: 1.5rem;
}

.contact-info p {
    margin-bottom: 1rem;
    color: var(--text-gray);
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Footer */
footer {
    padding: 5rem 2rem 2rem;
    background: linear-gradient(to bottom, var(--bg-dark), #020205);
    border-top: 1px solid var(--glass-border);
    position: relative;
    z-index: 10;
    scroll-snap-align: end;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 4rem;
    margin-bottom: 4rem;
}

.footer-info .logo-container {
    margin-bottom: 1.5rem;
}

.footer-info p {
    color: var(--text-gray);
    font-size: 0.95rem;
    line-height: 1.8;
}

.footer-links h4 {
    font-family: var(--font-heading);
    font-size: 1rem;
    margin-bottom: 1.5rem;
    color: var(--primary-accent);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-links ul {
    list-style: none;
}

.footer-links ul li {
    margin-bottom: 0.8rem;
}

.footer-links ul li a {
    color: var(--text-gray);
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.footer-links ul li a:hover {
    color: var(--primary-accent);
    padding-left: 5px;
}

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-bottom p {
    color: var(--text-gray);
    font-size: 0.85rem;
}

.social-links {
    display: flex;
    gap: 1.5rem;
}

.social-links a {
    width: 48px;
    height: 48px;
    /* Increased to meet 44x44px minimum touch target */
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-gray);
    font-size: 1.2rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.social-links a:hover {
    color: var(--primary-accent);
    background: rgba(0, 243, 255, 0.05);
    border-color: var(--primary-accent);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 243, 255, 0.2);
}

/* Tablet Breakpoint - 1024px */
@media (max-width: 1024px) {
    header {
        padding: 1rem 4%;
    }

    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    .section-title {
        font-size: 2.2rem;
    }

    .footer-container {
        grid-template-columns: 1fr 1fr;
        gap: 2.5rem;
    }
}

@media (max-width: 992px) {
    .footer-container {
        grid-template-columns: 1.5fr 1fr;
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .hero-section {
        background-attachment: scroll;
        /* Performance boost for mobile */
    }

    .section-title {
        font-size: clamp(1.8rem, 5vw, 2.5rem);
        margin-bottom: 2rem;
    }

    .services-section,
    .about-section,
    .contact-section {
        padding: 4rem 1.5rem;
    }
}

@media (max-width: 600px) {
    .footer-container {
        grid-template-columns: 1fr;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }
    
    /* Mobile banner ads optimization */
    .banner-ad-container {
        margin: 20px auto;
        padding: 0 15px;
    }
    
    /* Better touch targets for mobile */
    button, a, input, textarea, select {
        -webkit-tap-highlight-color: rgba(0, 243, 255, 0.2);
        touch-action: manipulation;
    }
    
    /* Improved mobile spacing */
    .services-section,
    .about-section,
    .contact-section {
        padding: 3rem 1rem;
    }
    
    /* Optimize font sizes for mobile readability */
    .hero-subtitle {
        font-size: clamp(1rem, 4vw, 1.2rem);
    }
    
    /* Better mobile grid spacing */
    .services-grid {
        gap: 1rem;
        padding: 0 1rem;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .section-title {
        font-size: 2rem;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .desktop-nav {
        display: none;
    }

    .mobile-menu-btn {
        display: block;
    }

    .contact-container {
        flex-direction: column;
    }

    .contact-info {
        border-left: none;
        border-top: 1px solid var(--glass-border);
        padding: 2rem;
    }
}

/* Breadcrumb Navigation - SEO Enhancement */
.breadcrumb {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 20px 0;
    font-size: 0.9rem;
    color: var(--text-gray);
}

.breadcrumb a {
    color: var(--primary-accent);
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.breadcrumb a:hover {
    opacity: 0.8;
}

.breadcrumb span {
    margin: 0 8px;
    color: var(--text-gray);
}

.breadcrumb .current {
    color: var(--text-white);
}

/* Performance Optimizations */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Mobile Performance Optimizations */
@media (max-width: 768px) {
    /* Disable heavy effects on mobile for better performance */
    body::before {
        display: none; /* Disable noise texture on mobile for performance */
    }
    
    .liquid-orb {
        opacity: 0.3; /* Reduce orb opacity on mobile */
    }
    
    /* Optimize animations on mobile */
    * {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
    
    /* Reduce backdrop-filter on mobile */
    .glass-card,
    .glass-panel {
        backdrop-filter: blur(5px);
        -webkit-backdrop-filter: blur(5px);
    }
}

img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.3s;
}

img[loading="lazy"].loaded {
    opacity: 1;
}