@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');

/* =========================================================================
   Reset & Variables
   ========================================================================= */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Color Palette */
    --color-primary: #1e1b4b; /* Deep Indigo / Purple */
    --color-secondary: #f59e0b; /* Bright Orange from Logo */
    --color-text-main: #334155;
    --color-text-muted: #64748B;
    --bg-white: #ffffff;
    --bg-light: #F8FAFC;
    --bg-blue-light: #f5f3ff;

    /* Gradients */
    --gradient-primary: linear-gradient(90deg, #7c3aed 0%, #f59e0b 100%);
    --gradient-card: linear-gradient(135deg, rgba(30,27,75,0.03) 0%, rgba(245,158,11,0.03) 100%);
    
    /* Shadows */
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    
    /* Layout */
    --font-family: 'Poppins', sans-serif;
    --radius-md: 12px;
    --radius-lg: 20px;
    --transition: 0.3s ease-in-out;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-family);
    color: var(--color-text-main);
    background-color: var(--bg-white);
    line-height: 1.6;
    overflow-x: hidden;
}

/* =========================================================================
   Utilities
   ========================================================================= */
a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition);
}

ul {
    list-style: none;
}

.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section {
    padding: 5rem 0;
}

.bg-light { background-color: var(--bg-light); }
.bg-blue { background-color: var(--bg-blue-light); }

.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--color-text-muted);
    margin-bottom: 3rem;
    max-width: 600px;
}

.text-center { text-align: center; }
.mx-auto { margin-left: auto; margin-right: auto; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 1.8rem;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background: var(--gradient-primary);
    color: #fff;
    box-shadow: 0 8px 20px rgba(124, 58, 237, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 25px rgba(245, 158, 11, 0.4);
}

.btn-secondary {
    background: transparent;
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
}

.btn-secondary:hover {
    background: var(--color-primary);
    color: #fff;
}

.btn-light {
    background: #fff;
    color: var(--color-primary);
    border: 2px solid #fff;
}

.btn-light:hover {
    background: transparent;
    color: #fff;
}

/* =========================================================================
   Navigation
   ========================================================================= */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    transform: none;
    width: 100%;
    max-width: none;
    z-index: 1000;
    padding: 0.8rem 2rem;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    background: rgba(255, 255, 255, 0.05); /* Glass base */
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0;
}

.navbar.scrolled {
    top: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    padding: 0.8rem 2rem;
}

.navbar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--color-primary);
}

.site-logo {
    height: 99px;
    width: auto;
    display: block;
    background: transparent;
    object-fit: contain;
}

/* Dark hero background par black patch ko visually merge karta hai */
.navbar:not(.scrolled) .site-logo {
    mix-blend-mode: screen;
}

.navbar.scrolled .site-logo {
    mix-blend-mode: normal;
}
.navbar.scrolled .logo { color: var(--color-primary); }

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links li a {
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
    color: var(--color-text-main);
}
.navbar:not(.scrolled) .nav-links li a.light-text {
    color: #fff;
}

.nav-links li a::after {
    content: '';
    position: absolute;
    width: 0%;
    height: 2px;
    bottom: -5px;
    left: 0;
    background: var(--color-secondary);
    transition: var(--transition);
}

.nav-links li a:hover::after,
.nav-links li a.active::after {
    width: 100%;
}

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

.mobile-menu-btn {
    display: none;
    font-size: 1.5rem;
    color: var(--color-primary);
    cursor: pointer;
    border: none;
    background: transparent;
}

/* =========================================================================
   Page Header (For Inner Pages)
   ========================================================================= */
.page-header {
    padding: 10rem 0 5rem;
    background: linear-gradient(135deg, rgba(30,27,75,0.92) 0%, rgba(30,27,75,0.85) 100%),
                url('https://images.unsplash.com/photo-1504384308090-c894fdcc538d?q=80&w=2000&auto=format&fit=crop');
    background-size: cover;
    background-position: center;
    color: #fff;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.page-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url('data:image/svg+xml;utf8,<svg width="40" height="40" xmlns="http://www.w3.org/2000/svg"><circle cx="2" cy="2" r="2" fill="rgba(255,255,255,0.05)"/></svg>') repeat;
}
.page-header h1 {
    font-size: 3rem;
    margin-bottom: 0.5rem;
    position: relative;
}
.page-header p {
    font-size: 1.1rem;
    color: rgba(255,255,255,0.8);
    position: relative;
}

/* =========================================================================
   Hero Section (Home) & AI Animations
   ========================================================================= */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background-color: #1e1b4b; /* Fallback */
    color: #fff;
    padding-top: 8rem;
    padding-bottom: 5rem;
    position: relative;
    overflow: hidden;
}

.hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    z-index: 0;
    transform: translateX(-50%) translateY(-50%);
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(30, 27, 75, 0.6) 0%, rgba(30, 27, 75, 0.8) 100%);
    z-index: 1;
}

/* Neural Network Background Grid */
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: 
        radial-gradient(circle at 50% 50%, rgba(124, 58, 237, 0.08) 2px, transparent 2px),
        linear-gradient(rgba(30, 27, 75, 0.4) 1px, transparent 1px),
        linear-gradient(90deg, rgba(30, 27, 75, 0.4) 1px, transparent 1px);
    background-size: 50px 50px;
    background-position: 0 0, 25px 25px, 25px 25px;
    animation: backgroundPan 20s linear infinite;
    z-index: 0;
    opacity: 0.6;
}

@keyframes backgroundPan {
    from { background-position: 0 0, 25px 25px, 25px 25px; }
    to { background-position: -50px -50px, -25px -25px, -25px -25px; }
}

.hero-particle {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    animation: orbit 15s linear infinite;
}
.hp-1 { top: 10%; left: 10%; width: 400px; height: 400px; background: rgba(124, 58, 237, 0.8); }
.hp-2 { bottom: 10%; right: 10%; width: 300px; height: 300px; background: #f59e0b; animation-direction: reverse; animation-duration: 20s; }

@keyframes orbit {
    0% { transform: rotate(0deg) translateX(50px) rotate(0deg) scale(1); }
    50% { transform: rotate(180deg) translateX(100px) rotate(-180deg) scale(1.2); }
    100% { transform: rotate(360deg) translateX(50px) rotate(-360deg) scale(1); }
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    position: relative;
    z-index: 2;
}

.hero-badge {
    display: inline-block;
    padding: 0.4rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
    color: #fff;
    /* AI Pulse Animation */
    box-shadow: 0 0 10px rgba(124, 58, 237, 0.4);
    animation: badgePulse 2s infinite ease-in-out alternate;
}

@keyframes badgePulse {
    0% { box-shadow: 0 0 5px rgba(124, 58, 237, 0.2); }
    100% { box-shadow: 0 0 20px rgba(124, 58, 237, 0.7), inset 0 0 10px rgba(255, 255, 255, 0.3); }
}

.hero-title {
    font-size: 3.5rem;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.hero-subtitle {
    font-size: 1.1rem;
    opacity: 0.8;
    margin-bottom: 2.5rem;
    max-width: 500px;
}

.hero-cta {
    display: flex;
    gap: 1rem;
}

.hero-visual {
    position: relative;
}

/* Glass Card */
.glass-box {
    background: rgba(20, 20, 40, 0.6);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
    position: relative;
    overflow: hidden;
}

/* AI Scanner Laser Line */
.glass-box::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--color-secondary);
    box-shadow: 0 0 15px 3px var(--color-secondary);
    animation: aiScan 4s infinite linear;
    opacity: 0.7;
}

@keyframes aiScan {
    0% { top: -10%; opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { top: 110%; opacity: 0; }
}

.hero-visual .glass-box {
    animation: float 6s ease-in-out infinite;
    transform: perspective(1000px) rotateY(-5deg) rotateX(5deg);
}

@keyframes float {
    0%, 100% { transform: perspective(1000px) rotateY(-5deg) rotateX(5deg) translateY(0); }
    50% { transform: perspective(1000px) rotateY(-2deg) rotateX(2deg) translateY(-20px); }
}

.code-mockup p {
    font-family: monospace;
    font-size: 0.9rem;
    color: #9cdcfe;
    margin-bottom: 0.5rem;
}
.code-mockup .keyword { color: #569cd6; }
.code-mockup .string { color: #ce9178; }
.code-mockup .function { color: #dcdcaa; }

/* Typing Cursor */
.type-cursor {
    display: inline-block;
    width: 8px;
    height: 15px;
    background: var(--color-secondary);
    vertical-align: middle;
    margin-left: 3px;
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* =========================================================================
   Stats Section
   ========================================================================= */
.stats {
    padding: 3rem 0;
    background: #fff;
    box-shadow: var(--shadow-md);
    position: relative;
    z-index: 10;
    margin-top: -50px;
    border-radius: var(--radius-md);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    text-align: center;
    gap: 2rem;
}

.stat-item h3 {
    font-size: 2.5rem;
    color: var(--color-primary);
    font-weight: 800;
}

.stat-item p {
    color: var(--color-text-muted);
    font-weight: 500;
}

/* =========================================================================
   Cards (Services/Features)
   ========================================================================= */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}
.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 3rem;
}

.card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 2.5rem 2rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0,0,0,0.05);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 4px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transform-origin: left;
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.card:hover::before {
    transform: scaleX(1);
}

.card-icon {
    width: 60px;
    height: 60px;
    border-radius: 15px;
    background: var(--bg-blue-light);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    color: var(--color-primary);
}

/* Gradient specific icons */
.c-icon-1 { background: rgba(124, 58, 237, 0.1); color: #7c3aed; }
.c-icon-2 { background: rgba(245, 158, 11, 0.1); color: #f59e0b; }
.c-icon-3 { background: rgba(6, 182, 212, 0.1); color: #06b6d4; } /* Cyan from logo dot */

.card-title {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    color: var(--color-primary);
}

.card-text {
    color: var(--color-text-muted);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

.card-link {
    font-weight: 600;
    color: var(--color-secondary);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}
.card-link:hover {
    gap: 0.8rem;
}

/* =========================================================================
   About Overview Snippet
   ========================================================================= */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-image {
    position: relative;
}

.about-image img {
    border-radius: var(--radius-lg);
    width: 100%;
}

.about-tag {
    position: absolute;
    bottom: -20px;
    right: -20px;
    background: var(--bg-white);
    padding: 1.5rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.about-tag h4 {
    color: var(--color-primary);
    font-size: 1.5rem;
}
.about-tag p {
    color: var(--color-text-muted);
    font-size: 0.9rem;
    line-height: 1.2;
}

ul.check-list {
    margin: 1.5rem 0 2rem;
}

ul.check-list li {
    position: relative;
    padding-left: 2rem;
    margin-bottom: 1rem;
    font-weight: 500;
}

ul.check-list li::before {
    content: '✓';
    position: absolute;
    left: 0; top: 0;
    color: #fff;
    background: var(--color-secondary);
    width: 20px; height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

/* =========================================================================
   Portfolio Gallery
   ========================================================================= */
.portfolio-item {
    border-radius: var(--radius-md);
    overflow: hidden;
    position: relative;
    box-shadow: var(--shadow-md);
}

.portfolio-img {
    width: 100%;
    height: 300px;
    background-color: var(--bg-blue-light);
    display: flex;
    align-items: center;
    justify-content: center;
}
.portfolio-img p { color: var(--color-primary); font-weight: 600; opacity: 0.5;}

.portfolio-content {
    padding: 1.5rem;
    background: #fff;
}

.p-tag {
    font-size: 0.8rem;
    color: #fff;
    background: var(--color-secondary);
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    margin-bottom: 0.5rem;
    display: inline-block;
}

.portfolio-item h3 {
    color: var(--color-primary);
    margin-bottom: 0.5rem;
}

/* =========================================================================
   Contact Form & Footer
   ========================================================================= */
.contact-wrapper {
    background: #fff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    display: grid;
    grid-template-columns: 1fr 1fr;
    overflow: hidden;
}

.contact-info {
    padding: 4rem;
    background: var(--color-primary);
    color: #fff;
}
.contact-info .section-title { color: #fff; }

.info-box {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.info-icon {
    width: 40px; height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-secondary);
}

.form-area {
    padding: 4rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-control {
    width: 100%;
    padding: 1rem 1.5rem;
    border: 1px solid #e5e7eb;
    border-radius: var(--radius-md);
    font-family: var(--font-family);
    transition: var(--transition);
    background: var(--bg-light);
}

.form-control:focus {
    outline: none;
    border-color: var(--color-secondary);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.2);
}

.footer {
    background: var(--color-primary);
    color: rgba(255, 255, 255, 0.7);
    padding: 5rem 0 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-logo {
    color: #fff;
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    display: inline-block;
}

.footer-site-logo {
    height: 99px;
    width: auto;
    display: block;
    margin-bottom: 20px;
    object-fit: contain;
}

.footer h4 {
    color: #fff;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.footer-links li {
    margin-bottom: 0.8rem;
}
.footer-links li a:hover {
    color: var(--color-secondary);
    padding-left: 5px;
}

.footer-bottom {
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
}

/* =========================================================================
   Responsive
   ========================================================================= */
@media (max-width: 992px) {
    .hero-container, .about-grid, .contact-wrapper {
        grid-template-columns: 1fr;
    }
    
    .stats {
        margin: 2rem 2rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .navbar {
        padding: 0.7rem 1rem;
    }

    .site-logo {
        height: 46px;
    }

    .nav-links {
        position: absolute;
        top: calc(100% + 15px);
        left: 0;
        width: 100%;
        background: #fff;
        flex-direction: column;
        padding: 2rem;
        box-shadow: var(--shadow-lg);
        border-radius: 20px;
        opacity: 0;
        visibility: hidden;
        transition: all var(--transition);
    }
    .nav-links.active {
        display: flex;
        opacity: 1;
        visibility: visible;
    }
    
    .navbar:not(.scrolled) .nav-links li a.light-text {
        color: var(--color-text-main);
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .hero-title, .page-header h1 {
        font-size: 2.5rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
    }
}
