/* =========================================
   Unisolve Technologies - CSS Stylesheet
   Theme: Tech Neon & Glassmorphism
========================================= */

/* --- Variables (Design Tokens) --- */
:root {
    /* Fonts */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    /* Layout */
    --max-width: 1200px;
    --section-padding: 100px 20px;
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    
    /* Header */
    --header-height: 80px;
}

/* --- Dark Theme (Default) --- */
[data-theme="dark"] {
    --bg-main: #0a0a0c;
    --bg-alt: #111116;
    --text-primary: #ffffff;
    --text-secondary: #a0a0b0;
    
    /* Brand Colors */
    --primary: #4f46e5; /* Indigo */
    --primary-hover: #4338ca;
    --accent: #06b6d4; /* Cyan */
    
    /* Gradients */
    --gradient-brand: linear-gradient(135deg, var(--primary), var(--accent));
    --gradient-glow: radial-gradient(circle, rgba(79, 70, 229, 0.15) 0%, rgba(10, 10, 12, 0) 70%);
    
    /* Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --input-bg: rgba(255, 255, 255, 0.05);
}

/* --- Light Theme --- */
[data-theme="light"] {
    --bg-main: #f8fafc;
    --bg-alt: #ffffff;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    
    /* Brand Colors */
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --accent: #0284c7;
    
    /* Gradients */
    --gradient-brand: linear-gradient(135deg, var(--primary), var(--accent));
    --gradient-glow: radial-gradient(circle, rgba(79, 70, 229, 0.08) 0%, rgba(248, 250, 252, 0) 70%);
    
    /* Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(0, 0, 0, 0.08);
    --input-bg: rgba(0, 0, 0, 0.03);
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--header-height);
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.4s ease, color 0.4s ease;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    line-height: 1.2;
    font-weight: 600;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

img {
    max-width: 100%;
    display: block;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: var(--section-padding);
}

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

/* --- Typography --- */
.gradient-text {
    background: var(--gradient-brand);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    display: inline-block;
}

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 1rem;
}

.section-desc {
    color: var(--text-secondary);
    font-size: 1.125rem;
    max-width: 600px;
    margin: 0 auto 3rem;
}

.text-center {
    text-align: center;
}

/* --- Buttons --- */
.btn-primary, .btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 500;
    font-family: var(--font-heading);
    cursor: pointer;
    border: none;
    transition: var(--transition);
}

.btn-primary {
    background: var(--gradient-brand);
    color: white;
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.4);
}

.btn-secondary {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

.btn-text {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--accent);
    font-weight: 500;
}

.btn-text:hover {
    gap: 0.75rem;
    color: var(--primary);
}

.btn-block {
    width: 100%;
}

/* --- Glassmorphism Utilities --- */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
}

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    transition: var(--transition);
    overflow: hidden;
}

.glass-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* --- Navbar --- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background: rgba(10, 10, 12, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
    z-index: 1000;
    transition: var(--transition);
}

[data-theme="light"] .navbar {
    background: rgba(255, 255, 255, 0.8);
}

.navbar.scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.nav-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
}

.accent {
    color: var(--accent);
}

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

.nav-links a:not(.btn-primary) {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.95rem;
}

.nav-links a:not(.btn-primary):hover {
    color: var(--text-primary);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.theme-toggle, .mobile-menu-btn {
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    border-radius: 50%;
    transition: var(--transition);
}

.theme-toggle:hover, .mobile-menu-btn:hover {
    background: var(--glass-bg);
}

.mobile-menu-btn {
    display: none;
}

/* Mobile Nav Overlay */
.mobile-nav {
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: 100%;
    height: calc(100vh - var(--header-height));
    background: var(--bg-main);
    z-index: 999;
    padding: 2rem;
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
}

.mobile-nav.active {
    transform: translateX(0);
}

.mobile-nav-links {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    font-size: 1.5rem;
    font-family: var(--font-heading);
    text-align: center;
}

/* --- Hero Section --- */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    padding-top: var(--header-height);
}

.glow-sphere {
    position: absolute;
    border-radius: 50%;
    background: var(--gradient-glow);
    z-index: -1;
    filter: blur(60px);
}

.sphere-1 {
    width: 600px;
    height: 600px;
    top: -100px;
    left: -100px;
}

.sphere-2 {
    width: 500px;
    height: 500px;
    bottom: -100px;
    right: -100px;
}

.hero-content {
    max-width: 800px;
    z-index: 1;
}

.tagline {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 100px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--accent);
    margin-bottom: 2rem;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.hero-title {
    font-size: clamp(3rem, 6vw, 5rem);
    letter-spacing: -1px;
    margin-bottom: 1.5rem;
}

.hero-subtitle {
    font-size: clamp(1.125rem, 2vw, 1.25rem);
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    max-width: 600px;
    margin-inline: auto;
}

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

/* --- Grid Systems --- */
.section-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.grid {
    display: grid;
    gap: 2rem;
}

.projects-grid {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.products-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

/* --- About Section --- */
.lead-text {
    font-size: 1.25rem;
    font-weight: 500;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.about-text p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.stat-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    padding: 1.5rem;
    border-radius: var(--radius-md);
}

.stat-icon {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.image-wrapper {
    padding: 1rem;
}

.rounded-img {
    border-radius: var(--radius-md);
    width: 100%;
    height: auto;
    object-fit: cover;
}

/* --- Projects Section --- */
.project-card {
    display: flex;
    flex-direction: column;
}

.card-img {
    width: 100%;
    height: 240px;
    overflow: hidden;
}

.card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.project-card:hover .card-img img {
    transform: scale(1.05);
}

.card-content {
    padding: 2rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card-content h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.card-content p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    border-radius: 100px;
    font-size: 0.875rem;
    align-self: flex-start;
}
[data-theme="light"] .badge {
    background: rgba(0, 0, 0, 0.05);
}


/* --- Products Section --- */
.product-item {
    padding: 2.5rem 2rem;
    text-align: center;
}

.product-icon {
    width: 64px;
    height: 64px;
    background: var(--gradient-brand);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    margin: 0 auto 1.5rem;
}

.product-item h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.product-item p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* --- Contact Section --- */
.contact-info {
    padding-right: 2rem;
}

.contact-details {
    margin-top: 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.125rem;
}

.contact-item i {
    font-size: 1.5rem;
    color: var(--accent);
}

.contact-form-wrapper {
    padding: 2.5rem;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    font-size: 0.9rem;
}

input, select, textarea {
    width: 100%;
    padding: 1rem;
    background: var(--input-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: var(--transition);
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.2);
}

::placeholder {
    color: var(--text-secondary);
    opacity: 0.5;
}

.custom-select {
    position: relative;
}

select {
    appearance: none;
    cursor: pointer;
}

.select-icon {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    pointer-events: none;
}

/* Form Success State */
.form-success {
    margin-top: 1.5rem;
    padding: 1rem;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: var(--radius-sm);
    color: #10b981;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
}

.hidden {
    display: none;
}

/* --- Footer --- */
.footer {
    border-top: 1px solid var(--glass-border);
    padding: 4rem 0 2rem;
    background: var(--bg-main);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
}

.footer-brand p {
    color: var(--text-secondary);
    margin-top: 0.5rem;
    font-size: 0.9rem;
}

.footer-social {
    display: flex;
    gap: 1rem;
}

.footer-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    font-size: 1.25rem;
}

.footer-social a:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.875rem;
    padding-top: 2rem;
    border-top: 1px solid var(--glass-border);
}


/* --- Animations (AOS style) --- */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

.delay-1 {
    transition-delay: 0.2s;
}

/* --- Media Queries --- */
@media (max-width: 968px) {
    .section-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .about-image {
        grid-row: 1; /* Move image above text on mobile */
    }
    
    .contact-info {
        padding-right: 0;
        text-align: center;
    }
    
    .contact-details {
        align-items: center;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .mobile-menu-btn {
        display: flex;
    }
    
    .hero-title {
        font-size: clamp(2.5rem, 8vw, 3rem);
    }
    
    .hero-cta {
        flex-direction: column;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 2rem;
        text-align: center;
    }
}
